Documentation ¶
Index ¶
- func Ctx(next http.Handler) http.Handler
- func GetDiscordCallback(w http.ResponseWriter, r *http.Request)
- func GetDiscordLink(w http.ResponseWriter, r *http.Request)
- func GetLogin(w http.ResponseWriter, r *http.Request)
- func GetLoginCallback(w http.ResponseWriter, r *http.Request)
- func GetLogout(w http.ResponseWriter, r *http.Request)
- func GetSelf(w http.ResponseWriter, r *http.Request)
- func GetUser(w http.ResponseWriter, r *http.Request)
- func NewUserListResponse(users []models.User) []render.Renderer
- func PatchUser(w http.ResponseWriter, r *http.Request)
- func Router(r chi.Router)
- func UnlinkDiscord(w http.ResponseWriter, r *http.Request)
- func UpdateUser(w http.ResponseWriter, r *http.Request)
- type DiscordResp
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDiscordCallback ¶
func GetDiscordCallback(w http.ResponseWriter, r *http.Request)
func GetDiscordLink ¶
func GetDiscordLink(w http.ResponseWriter, r *http.Request)
func GetLoginCallback ¶
func GetLoginCallback(w http.ResponseWriter, r *http.Request)
func GetSelf ¶
func GetSelf(w http.ResponseWriter, r *http.Request)
GetSelf godoc @Summary Get your user @Description Get information for the user logged in @Tags user @Accept json @Produce json @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/ [get]
func GetUser ¶
func GetUser(w http.ResponseWriter, r *http.Request)
GetUser godoc @Summary Get a specific user @Description Get information for the user @Tags user @Accept json @Produce json @Param CID path int true "CID" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid} [get]
func PatchUser ¶
func PatchUser(w http.ResponseWriter, r *http.Request)
PatchUser godoc @Summary Patch a user @Description Patch information for the user @Tags user @Accept json @Produce json @Param CID path int true "CID" @Param user body Request true "User" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid} [patch]
func UnlinkDiscord ¶
func UnlinkDiscord(w http.ResponseWriter, r *http.Request)
UnlinkDiscord godoc @Summary Unlink your Discord account @Description Unlink your Discord account from your VATUSA account @Tags discord @Accept json @Produce json @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/discord/unlink [get]
func UpdateUser ¶
func UpdateUser(w http.ResponseWriter, r *http.Request)
UpdateUser godoc @Summary Update a user @Description Update information for the user @Tags user @Accept json @Produce json @Param CID path int true "CID" @Param user body Request true "User" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid} [put]