Documentation ¶
Index ¶
- func DelAnnounce(c *gin.Context)
- func DelImage(c *gin.Context)
- func GetAllAnnounceList(c *gin.Context)
- func GetAnnounce(c *gin.Context)
- func GetAnnounceList(c *gin.Context)
- func GetAnnounceListMe(c *gin.Context)
- func GetCurrentAnnounceList(c *gin.Context)
- func GetImage(c *gin.Context)
- func GetImageList(c *gin.Context)
- func GetLolHistory(c *gin.Context)
- func GetLolHistoryList(c *gin.Context)
- func GetLolHistoryPerDate(c *gin.Context)
- func GetMe(c *gin.Context)
- func GetOwnStateHistory(c *gin.Context)
- func GetStateHistory(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserList(c *gin.Context)
- func Initialize(router *gin.RouterGroup)
- func PatchAnnounce(c *gin.Context)
- func PatchRiotAccessToken(c *gin.Context)
- func PatchUser(c *gin.Context)
- func PatchUserLolName(c *gin.Context)
- func PostAnnounce(c *gin.Context)
- func PostAppicationToken(c *gin.Context)
- func PostImage(c *gin.Context)
- func PostLolHistoryUpdate(c *gin.Context)
- func PostMigrationHistoryFrom(c *gin.Context)
- func PostState(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelAnnounce ¶
DelAnnounce is handler for endpoint DELETE /announce/{id} @Summary Delete announce @Description Delete announce by announce id @Description Permission : **announce.delete** @Accept json @Produce json @Param id path string true "Announce ID" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announce/{id} [delete]
func DelImage ¶
DelImage is handler for endpoint DELETE /image/{id} @Summary Delete image @Description Delete image by image id. @Description Permission : **image.delete** @Accept json @Produce json @Param id path string true "Image ID" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/image @Router /v1/image/{id} [delete]
func GetAllAnnounceList ¶
GetAllAnnounceList is handler for endpoint GET /announces/all @Summary Get all announce list @Description Get all announce list sorted by creation time @Description Permission : **announces.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{list=[]models.Announce} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announces/all [get]
func GetAnnounce ¶
GetAnnounce is handler for endpoint GET /announce/{id} @Summary Get announce @Description Get specific announce by announce id @Description Permission : **announce.get** @Accept json @Produce json @Param id path string true "Announce ID" @Success 200 {object} docmodels.ResponseSuccess{announce=models.Announce} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announce/{id} [get]
func GetAnnounceList ¶
GetAnnounceList is handler for endpoint GET /announces/user/{id} @Summary Get announce list by user id @Description Get announce list written by user @Description Permission : **announces.get** @Accept json @Produce json @Param id path string true "User ID" @Success 200 {object} docmodels.ResponseSuccess{list=[]models.Announce} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announces/user/{id} [get]
func GetAnnounceListMe ¶
GetAnnounceListMe is handler for endpoint GET /announces/me @Summary Get own announce list @Description get announce list written by me @Description Permission : **announces.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{list=[]models.Announce} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announces/me [get]
func GetCurrentAnnounceList ¶
GetCurrentAnnounceList is handler for endpoint GET /announces/current @Summary Get current announce list @Description Get announce list greater then target-date from NOW sorted by creation time @Description Permission : **announces.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{list=[]models.Announce} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announces/current [get]
func GetImage ¶
GetImage is handler for endpoint GET /image/{id} @Summary Get image by id @Description Get Image. When Success it provide image @Accept json @Produce png @Produce jpeg @Produce gif @Param id path string true "Image ID" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/image @Router /v1/image/{id} [get]
func GetImageList ¶
GetImageList is handler for endpoint GET /images @Summary Get my image list @Description Get Image list uploaded from me. @Description Permission : **imagelist.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{images=[]docmodels.ResponseImageElement} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/image @Router /v1/images [get]
func GetLolHistory ¶
GetLolHistory is handler for endpoint GET /lol/history/{id} @Summary Get lol history @Description Find game after the timestamp and store to DB @Accept json @Produce json @Param id path string true "Game ID" @Success 200 {object} docmodels.ResponseSuccess{game=interface{}} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/lol/history @Router /v1/lol/history/{id} [get]
func GetLolHistoryList ¶
GetLolHistoryList is handler for endpoint GET /lol/histories @Summary Get lol histories @Description Get game histories @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{games=[]docmodels.ResponseLoLHistory} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/lol/history @Router /v1/lol/histories [get]
func GetLolHistoryPerDate ¶
GetLolHistoryPerDate is handler for endpoint GET /lol/datelogs @Summary Get game counts and win rate per date @Description Game count per date and calculate win count by queue id @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{games=[]docmodels.ResponseDateLog} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/lol/history @Router /v1/lol/datelogs [get]
func GetMe ¶
GetMe is handler for endpoint GET /user @Summary Get My User Information @Description Get me @Description Permission : **user.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{user=models.User} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/user @Router /v1/user [get]
func GetOwnStateHistory ¶
GetOwnStateHistory is handler for endpoint GET /states @Summary Get my state history @Description Get my state change history @Description Permission : **states.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{history=[]models.DFDHistory} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/state @Router /v1/states [get]
func GetStateHistory ¶
GetStateHistory is handler for endpoint GET /states/{id} @Summary Get state history @Description Get user's state change history @Description Permission : **states.get** @Accept json @Produce json @Param id path string true "User ID" @Success 200 {object} docmodels.ResponseSuccess{history=[]models.DFDHistory} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/state @Router /v1/states/{id} [get]
func GetUser ¶
GetUser is handler for endpoint GET /user/{id} @Summary Get User Information @Description Get user by user id @Description Permission : **user.get** @ID get-string-by-string @Accept json @Produce json @Param id path string true "User ID" @Success 200 {object} docmodels.ResponseSuccess{user=models.User} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/user @Router /v1/user/{id} [get]
func GetUserList ¶
GetUserList is handler for endpoint GET /userlist @Summary Get User List @Description Get userlinst who is not guest. @Description Permission : **user.get** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{user=[]primitive.ObjectID} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/user @Router /v1/userlist [get]
func PatchAnnounce ¶
PatchAnnounce is handler for endpoint PATCH /announce/{id} @Summary Patch Announce @Description Edit spcific announce written by me @Description Permission : **announce.get** @Accept json @Produce json @Param id path string true "Announce ID" @Param body body docmodels.RequestBodyAnnouncePost true "body" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announce/{id} [patch]
func PatchRiotAccessToken ¶
PatchRiotAccessToken is handler for endpoint PATCH /application/riot/access @Summary Patch Riot Token @Description Riot token updator (This api only available on "Riot development token". If I get application token, This endpoint will be deleted) @Description Permission : **admin.token.create** @Accept json @Produce json @Param body body docmodels.RequestBodyToken true "body" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/admin @Router /v1/application/riot/access [patch]
func PatchUser ¶
PatchUser is handler for endpoint PATCH /userlist @Summary Edit user information @Description edit userfield. @Description Permission : **user.patch** @Accept json @Produce json @Param username body docmodels.RequestBodyPatchUser true "username" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/user @Router /v1/user [patch]
func PatchUserLolName ¶
PatchUserLolName is handler for endpoint PATCH /user/lol @Summary Patch LOL Information @Description Update LOL user informations @Description Permission : **user.patch** @Accept json @Produce json @Param lol_username body docmodels.RequestEmpty{lol_username=string} true "league of legends username" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/user @Router /v1/user/lol [patch]
func PostAnnounce ¶
PostAnnounce is handler for endpoint POST /announce @Summary Write announce @Description write announce @Description Permission : **announce.post** @Accept json @Produce json @Param bodymap body docmodels.RequestBodyAnnouncePost true "username" @Success 200 {object} docmodels.ResponseSuccess{id=primitive.ObjectId} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/announce @Router /v1/announce [post]
func PostAppicationToken ¶
PostAppicationToken is handler for endpoint POST /application/token @Summary Create new application token @Description 1st party application token. @Description Permission : **admin.token.create** @Accept json @Produce json @Success 200 {object} docmodels.ResponseSuccess{token=string} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/admin @Router /v1/application/token [post]
func PostImage ¶
PostImage is handler for endpoint POST /image @Summary Post image @Description Upload Image by base64 image. It supports **png, jpeg, gif** @Description Permission : **image.post** @Accept json @Produce json @Param img body docmodels.RequestBodyImagePost true "base64 image" @Success 200 {object} docmodels.ResponseSuccess{id=string} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/image @Router /v1/image [post]
func PostLolHistoryUpdate ¶
PostLolHistoryUpdate is handler for endpoint POST /lol/history/updater @Summary Update lol history @Description Find game after the timestamp and store to DB @Description **Application Token** is required. @Accept json @Produce json @Param X-Dfd-App-Auth header string true "application access token" @Success 200 {object} docmodels.ResponseSuccess{results=[]primitive.ObjectID} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/lol/history @Router /v1/lol/history/updater [post]
func PostMigrationHistoryFrom ¶
PostMigrationHistoryFrom is handler for endpoint POST /lol/history/migration @Summary Migration lol history from 2021-01-01. @Description migration and store to DB. @Description **Application Token** is required. @Accept json @Produce json @Param X-Dfd-App-Auth header string true "application access token" @Success 200 {object} docmodels.ResponseSuccess{results=[]primitive.ObjectID} "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @tags api/v1/lol/history @Router /v1/lol/history/migration [post]
func PostState ¶
PostState is handler for endpoint POST /state @Description Create state @Description Permission : **states.post** @Accept json @Produce json @Param state body docmodels.RequestBodyStatePost true "Create user state" @Success 200 {object} docmodels.ResponseSuccess "success" @Failure 500 {object} docmodels.ResponseInternalServerError "Internal Server Error" @Failure 404 {object} docmodels.ResponseNotFound "Cannt found user" @Failure 403 {object} docmodels.ResponseNotFound "You don't have permission" @Failure 401 {object} docmodels.ResponseUnauthorized "Unauthorized Request. If token is expired, **token_expired** filed must be set true" @Failure 400 {object} docmodels.ResponseBadRequest "Bad request" @Security ApiKeyAuth @tags api/v1/state @Router /v1/state [post]
Types ¶
This section is empty.