Documentation ¶
Index ¶
- func Ctx(next http.Handler) http.Handler
- func DeleteUserFlag(w http.ResponseWriter, r *http.Request)
- func GetUserFlag(w http.ResponseWriter, r *http.Request)
- func NewUserFlagListResponse(userFlags []models.UserFlag) []render.Renderer
- func PatchUserFlag(w http.ResponseWriter, r *http.Request)
- func Router(r chi.Router)
- func UpdateUserFlag(w http.ResponseWriter, r *http.Request)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUserFlag ¶
func DeleteUserFlag(w http.ResponseWriter, r *http.Request)
DeleteUserFlag godoc @Summary Delete a user flag @Description Delete a user flag @Tags user-flag @Accept json @Produce json @Param cid path int true "CID" @Success 204 @Failure 400 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/user-flag [delete]
func GetUserFlag ¶
func GetUserFlag(w http.ResponseWriter, r *http.Request)
GetUserFlag godoc @Summary Get a user flag @Description Get a user flag @Tags user-flag @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 500 {object} utils.ErrResponse @Router /user/{cid}/user-flag [get]
func NewUserFlagListResponse ¶
func PatchUserFlag ¶
func PatchUserFlag(w http.ResponseWriter, r *http.Request)
PatchUserFlag godoc @Summary Patch a user flag @Description Patch a user flag @Tags user-flag @Accept json @Produce json @Param cid path int true "CID" @Param user_flag body Request true "User Flag" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/user-flag [patch]
func UpdateUserFlag ¶
func UpdateUserFlag(w http.ResponseWriter, r *http.Request)
UpdateUserFlag godoc @Summary Update a user flag @Description Update a user flag @Tags user-flag @Accept json @Produce json @Param cid path int true "CID" @Param user_flag body Request true "User Flag" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/user-flag [put]
Types ¶
type Request ¶
type Request struct { NoStaffRole bool `json:"no_staff_role" example:"false"` NoStaffLogEntryID uint `json:"no_staff_log_entry_id" example:"1"` NoVisiting bool `json:"no_visiting" example:"false"` NoVisitingLogEntryID uint `json:"no_visiting_log_entry_id" example:"1"` NoTransferring bool `json:"no_transferring" example:"false"` NoTransferringLogEntryID uint `json:"no_transferring_log_entry_id" example:"1"` NoTraining bool `json:"no_training" example:"false"` NoTrainingLogEntryID uint `json:"no_training_log_entry_id" example:"1"` UsedTransferOverride bool `json:"used_transfer_override" example:"false"` }