Documentation ¶
Index ¶
- func CreateDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
- func Ctx(next http.Handler) http.Handler
- func DeleteDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
- func GetDisciplinaryLog(w http.ResponseWriter, r *http.Request)
- func NewDisciplinaryLogEntryListResponse(dle []models.DisciplinaryLogEntry) []render.Renderer
- func PatchDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
- func Router(r chi.Router)
- func UpdateDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDisciplinaryLogEntry ¶
func CreateDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
CreateDisciplinaryLogEntry godoc @Summary Create a new disciplinary log entry @Description Create a new disciplinary log entry @Tags disciplinary-log @Accept json @Produce json @Param cid path int true "User CID" @Param action_log body Request true "Disciplinary Log Entry" @Success 201 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/disciplinary-log [post]
func DeleteDisciplinaryLogEntry ¶
func DeleteDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
DeleteDisciplinaryLogEntry godoc @Summary Delete a disciplinary log entry @Description Delete a disciplinary log entry @Tags disciplinary-log @Accept json @Produce json @Param cid path int true "User CID" @Param id path int true "Disciplinary Log Entry ID" @Success 204 @Failure 400 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/disciplinary-log/{id} [delete]
func GetDisciplinaryLog ¶
func GetDisciplinaryLog(w http.ResponseWriter, r *http.Request)
GetDisciplinaryLog godoc @Summary Get all disciplinary log entries @Description List all disciplinary log entries @Tags disciplinary-log @Accept json @Produce json @Param cid path int true "User CID" @Param vatusa_only query bool false "VATUSA Only" @Success 200 {object} []Response @Failure 422 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/disciplinary-log [get]
func NewDisciplinaryLogEntryListResponse ¶
func NewDisciplinaryLogEntryListResponse(dle []models.DisciplinaryLogEntry) []render.Renderer
func PatchDisciplinaryLogEntry ¶
func PatchDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
PatchDisciplinaryLogEntry godoc @Summary Patch an disciplinary log entry @Description Patch an disciplinary log entry @Tags disciplinary-log @Accept json @Produce json @Param cid path int true "User CID" @Param id path int true "Disciplinary Log Entry ID" @Param disciplinary_log body Request true "Disciplinary Log Entry" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/disciplinary-log/{id} [patch]
func UpdateDisciplinaryLogEntry ¶
func UpdateDisciplinaryLogEntry(w http.ResponseWriter, r *http.Request)
UpdateDisciplinaryLogEntry godoc @Summary Update a disciplinary log entry @Description Update a disciplinary log entry @Tags disciplinary-log @Accept json @Produce json @Param id path int true "Disciplinary Log Entry ID" @Param disciplinary_log body Request true "Disciplinary Log Entry" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /user/{cid}/disciplinary-log/{id} [put]
Types ¶
type Request ¶
type Response ¶
type Response struct {
*models.DisciplinaryLogEntry
}
func NewDisciplinaryLogEntryResponse ¶
func NewDisciplinaryLogEntryResponse(dle *models.DisciplinaryLogEntry) *Response