Documentation
¶
Index ¶
- func CleanGameHandler(ctx *gin.Context)
- func DeleteGameInfoHandler(c *gin.Context)
- func GetAllAuthorsHandler(ctx *gin.Context)
- func GetGameInfoByIDHandler(c *gin.Context)
- func GetGameInfoByPlatformIDHandler(c *gin.Context)
- func GetGameInfosByNameHandler(c *gin.Context)
- func GetGameItemByIDHanlder(c *gin.Context)
- func GetGameItemByRawNameHandler(c *gin.Context)
- func GetGameItemsByAuthorHandler(ctx *gin.Context)
- func GetRankingHandler(c *gin.Context)
- func GetUnorganizedGameItemsHandler(c *gin.Context)
- func HealthCheckHandler(c *gin.Context)
- func OrganizeGameItemHandler(c *gin.Context)
- func SearchGamesHandler(c *gin.Context)
- func UpdateGameInfoHandler(c *gin.Context)
- type DeleteGameInfoRequest
- type DeleteGameInfoResponse
- type GetAllAuthorsResponse
- type GetGameInfoByIDRequest
- type GetGameInfoByIDResponse
- type GetGameInfoByPlatformIDRequest
- type GetGameInfoByPlatformIDResponse
- type GetGameInfosByNameRequest
- type GetGameInfosByNameResponse
- type GetGameItemByIDRequest
- type GetGameItemByIDResponse
- type GetGameItemByRawNameRequest
- type GetGameItemByRawNameResponse
- type GetGameItemsByAuthorRequest
- type GetGameItemsByAuthorResponse
- type GetRankingResponse
- type GetUnorganizedGameItemsRequest
- type GetUnorganizedGameItemsResponse
- type HealthCheckResponse
- type OrganizeGameItemRequest
- type OrganizeGameItemResponse
- type SearchGamesRequest
- type SearchGamesResponse
- type UpdateGameInfoRequest
- type UpdateGameInfoResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanGameHandler ¶
func DeleteGameInfoHandler ¶
DeleteGameInfoHandler is the handler for deleting game info @Summary Delete game info by ID @Description Delete game info by ID @Tags game @Produce json @Param Authorization header string true "Authorization: Bearer <api_key>" @Param id path string true "Game ID" @Success 200 {object} DeleteGameInfoResponse @Failure 400 {object} DeleteGameInfoResponse @Failure 500 {object} DeleteGameInfoResponse @Security BearerAuth @Router /game/id/{id} [delete]
func GetAllAuthorsHandler ¶
GetAllAuthorsHandler returns all authors @Summary Get all authors @Description Get all authors @Tags author @Accept json @Produce json @Success 200 {object} GetAllAuthorsResponse @Failure 500 {object} GetAllAuthorsResponse @Router /author [get]
func GetGameInfoByIDHandler ¶
GetGameInfoByID retrieves game information by ID. @Summary Retrieve game info by ID @Description Retrieves details of a game by game ID @Tags game @Accept json @Produce json @Param id path string true "Game ID" @Success 200 {object} GetGameInfoByIDResponse @Failure 400 {object} GetGameInfoByIDResponse @Failure 500 {object} GetGameInfoByIDResponse @Router /game/id/{id} [get]
func GetGameInfoByPlatformIDHandler ¶
GetGameInfoByPlatformID retrieves game information by platform and ID. @Summary Retrieve game info by platform ID @Description Retrieves game information based on a platform type and platform ID @Tags game @Accept json @Produce json @Param platform_type path string true "Platform Type" @Param platform_id path int true "Platform ID" @Success 200 {object} GetGameInfoByPlatformIDResponse @Failure 400 {object} GetGameInfoByPlatformIDResponse @Failure 500 {object} GetGameInfoByPlatformIDResponse @Router /game/platform/{platform_type}/{platform_id} [get]
func GetGameInfosByNameHandler ¶
GetGameInfosByName retrieves game information by game name. @Summary Retrieve game info by name @Description Retrieves game information details by game name @Tags game @Accept json @Produce json @Param name path string true "Game Name" @Success 200 {object} GetGameInfosByNameResponse @Failure 400 {object} GetGameInfosByNameResponse @Failure 500 {object} GetGameInfosByNameResponse @Router /game/name/{name} [get]
func GetGameItemByIDHanlder ¶
GetGameItemByID retrieves game download details by ID. @Summary Retrieve game download by ID @Description Retrieves details of a game download by game ID @Tags game @Accept json @Produce json @Param id path string true "Game Download ID" @Success 200 {object} GetGameItemByIDResponse @Failure 400 {object} GetGameItemByIDResponse @Failure 500 {object} GetGameItemByIDResponse @Router /game/raw/id/{id} [get]
func GetGameItemByRawNameHandler ¶
GetGameItemByRawName retrieves game download details by raw name. @Summary Retrieve game download by raw name @Description Retrieves details of a game download by its raw name @Tags game @Accept json @Produce json @Param name path string true "Game Download Raw Name" @Success 200 {object} GetGameItemByRawNameResponse @Failure 400 {object} GetGameItemByRawNameResponse @Failure 500 {object} GetGameItemByRawNameResponse @Router /game/raw/name/{name} [get]
func GetGameItemsByAuthorHandler ¶
GetGameItemsByAuthorHandler returns all game downloads by author @Summary Get game downloads by author @Description Get game downloads by author @Tags game @Accept json @Produce json @Param author path string true "Author" @Param page query int false "Page" @Param page_size query int false "Page Size" @Success 200 {object} GetGameItemsByAuthorResponse @Failure 400 {object} GetGameItemsByAuthorResponse @Failure 500 {object} GetGameItemsByAuthorResponse @Router /game/raw/author/{author} [get]
func GetRankingHandler ¶
GetRanking retrieves game rankings. @Summary Retrieve rankings @Description Retrieves rankings based on a specified type @Tags ranking @Accept json @Produce json @Param type path string true "Ranking Type(top, week-top, best-of-the-year, most-played)" @Success 200 {object} GetRankingResponse @Failure 400 {object} GetRankingResponse @Failure 500 {object} GetRankingResponse @Router /ranking/{type} [get]
func GetUnorganizedGameItemsHandler ¶
GetUnorganizedGameItems retrieves a list of unorganized game downloads. @Summary List unorganized game downloads @Description Retrieves game downloads that have not been organized @Tags game @Accept json @Produce json @Param num query int false "Number of game downloads to retrieve" @Success 200 {object} GetUnorganizedGameItemsResponse @Failure 400 {object} GetUnorganizedGameItemsResponse @Failure 500 {object} GetUnorganizedGameItemsResponse @Router /game/raw/unorganized [get]
func HealthCheckHandler ¶
HealthCheckHandler performs a health check of the service. @Summary Health Check @Description Performs a server health check and returns detailed server status including the current time, uptime, and configuration settings such as AutoCrawl. @Tags health @Accept json @Produce json @Success 200 {object} HealthCheckResponse @Failure 500 {string} HealthCheckResponse @Router /healthcheck [get]
func OrganizeGameItemHandler ¶
OrganizeGameItem organizes a specific game download. @Summary Organize a game download @Description Organizes a game download based on platform and game ID @Tags game @Accept json @Produce json @Param Authorization header string true "Authorization: Bearer <api_key>" @Param body body OrganizeGameItemRequest true "Organize Game Download Request" @Success 200 {object} OrganizeGameItemResponse @Failure 400 {object} OrganizeGameItemResponse @Failure 401 {object} OrganizeGameItemResponse @Failure 500 {object} OrganizeGameItemResponse @Security BearerAuth @Router /game/raw/organize [post]
func SearchGamesHandler ¶
SearchGames searches for games based on a keyword. @Summary Search games @Description Searches for games based on the provided keyword @Tags game @Accept json @Produce json @Param keyword query string true "Search keyword" @Param page query int false "Page number" @Param page_size query int false "Number of items per page" @Success 200 {object} SearchGamesResponse @Failure 400 {object} SearchGamesResponse @Failure 500 {object} SearchGamesResponse @Router /game/search [get]
func UpdateGameInfoHandler ¶
UpdateGameInfoHandler updates game information. @Summary Update game info @Description Updates details of a game @Tags game @Accept json @Produce json @Param Authorization header string true "Authorization: Bearer <api_key>" @Param body body handler.UpdateGameInfoRequest true "Update Game Info Request" @Success 200 {object} handler.UpdateGameInfoResponse @Failure 400 {object} handler.UpdateGameInfoResponse @Failure 401 {object} handler.UpdateGameInfoResponse @Failure 500 {object} handler.UpdateGameInfoResponse @Router /game/update [post]
Types ¶
type DeleteGameInfoRequest ¶
type DeleteGameInfoRequest struct {
ID string `uri:"id" binding:"required"`
}
type DeleteGameInfoResponse ¶
type GetAllAuthorsResponse ¶
type GetGameInfoByIDRequest ¶
type GetGameInfoByIDRequest struct {
ID string `uri:"id" binding:"required"`
}
type GetGameInfoByIDResponse ¶
type GetGameInfosByNameRequest ¶
type GetGameInfosByNameRequest struct {
Name string `uri:"name" binding:"required"`
}
type GetGameItemByIDRequest ¶
type GetGameItemByIDRequest struct {
ID string `uri:"id" binding:"required"`
}
type GetGameItemByIDResponse ¶
type GetGameItemByRawNameRequest ¶
type GetGameItemByRawNameRequest struct {
Name string `uri:"name" binding:"required"`
}
type GetRankingResponse ¶
type GetUnorganizedGameItemsRequest ¶
type GetUnorganizedGameItemsRequest struct {
Num int `json:"num" form:"num"`
}
type HealthCheckResponse ¶
type HealthCheckResponse struct { Version string `json:"version"` Status string `json:"status"` Message string `json:"message,omitempty"` Date string `json:"date"` Uptime string `json:"uptime"` Alloc string `json:"alloc"` AutoCrawl bool `json:"auto_crawl"` GameItem int64 `json:"game_download,omitempty"` GameInfo int64 `json:"game_info,omitempty"` Unorganized int64 `json:"unorganized,omitempty"` RedisAvaliable bool `json:"redis_avaliable"` OnlineFixAvaliable bool `json:"online_fix_avaliable"` MegaAvaliable bool `json:"mega_avaliable"` }
type OrganizeGameItemRequest ¶
type SearchGamesRequest ¶
type SearchGamesResponse ¶
type UpdateGameInfoRequest ¶
Source Files
¶
- clean_game.go
- delete_game_info.go
- get_all_authors.go
- get_game_Infos_by_name.go
- get_game_by_id.go
- get_game_by_raw_name.go
- get_game_info_by_id.go
- get_game_info_by_platform_id.go
- get_games_by_author.go
- get_ranking.go
- get_unorganized_games.go
- healthcheck.go
- organize_game_info.go
- search_games.go
- update_game_info.go