package
0.0.0-20210217154330-1a7f21c91fa9
Repository: https://github.com/devsdk/dfd.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
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.
DelImage is handler for endpoint DELETE /image/{id} @Summary Delete image @Description Delete image by image id.
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.
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.
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.
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.
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.
GetImage is handler for endpoint GET /image/{id} @Summary Get image by id @Description Get Image.
GetImageList is handler for endpoint GET /images @Summary Get my image list @Description Get Image list uploaded from me.
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.
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.
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.
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.
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.
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.
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.
GetUserList is handler for endpoint GET /userlist @Summary Get User List @Description Get userlinst who is not guest.
Initialize all routes for v1 apis.
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.
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".
PatchUser is handler for endpoint PATCH /userlist @Summary Edit user information @Description edit userfield.
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.
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].
PostAppicationToken is handler for endpoint POST /application/token @Summary Create new application token @Description 1st party application token.
PostImage is handler for endpoint POST /image @Summary Post image @Description Upload Image by base64 image.
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.
PostMigrationHistoryFrom is handler for endpoint POST /lol/history/migration @Summary Migration lol history from 2021-01-01.
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.