Documentation ¶
Index ¶
- func CreateFacilityLogEntry(w http.ResponseWriter, r *http.Request)
- func Ctx(next http.Handler) http.Handler
- func DeleteFacilityLog(w http.ResponseWriter, r *http.Request)
- func GetFacilityLog(w http.ResponseWriter, r *http.Request)
- func ListFacilityLog(w http.ResponseWriter, r *http.Request)
- func NewFacilityLogEntryListResponse(fle []models.FacilityLogEntry) []render.Renderer
- func PatchFacilityLog(w http.ResponseWriter, r *http.Request)
- func Router(r chi.Router)
- func UpdateFacilityLog(w http.ResponseWriter, r *http.Request)
- type Request
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFacilityLogEntry ¶
func CreateFacilityLogEntry(w http.ResponseWriter, r *http.Request)
CreateFacilityLogEntry godoc @Summary Create a new facility log entry @Description Create a new facility log entry @Tags facility-log @Accept json @Produce json @Param facility_log body Request true "Facility Log Entry" @Success 201 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /facility-log [post]
func DeleteFacilityLog ¶
func DeleteFacilityLog(w http.ResponseWriter, r *http.Request)
DeleteFacilityLog godoc @Summary Delete a facility log entry @Description Delete a facility log entry @Tags facility-log @Accept json @Produce json @Param id path string true "Facility Log Entry ID" @Success 204 @Failure 500 {object} utils.ErrResponse @Router /facility-log/{id} [delete]
func GetFacilityLog ¶
func GetFacilityLog(w http.ResponseWriter, r *http.Request)
GetFacilityLog godoc @Summary Get a facility log entry @Description Get a facility log entry @Tags facility-log @Accept json @Produce json @Param id path string true "Facility Log Entry ID" @Success 200 {object} Response @Failure 404 {object} utils.ErrResponse @Router /facility-log/{id} [get]
func ListFacilityLog ¶
func ListFacilityLog(w http.ResponseWriter, r *http.Request)
ListFacilityLog godoc @Summary List facility log entries @Description List facility log entries @Tags facility-log @Accept json @Produce json @Success 200 {object} Response @Failure 422 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /facility-log [get]
func NewFacilityLogEntryListResponse ¶
func NewFacilityLogEntryListResponse(fle []models.FacilityLogEntry) []render.Renderer
func PatchFacilityLog ¶
func PatchFacilityLog(w http.ResponseWriter, r *http.Request)
PatchFacilityLog godoc @Summary Patch a facility log entry @Description Patch a facility log entry @Tags facility-log @Accept json @Produce json @Param id path string true "Facility Log Entry ID" @Param facility_log body Request true "Facility Log Entry" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /facility-log/{id} [patch]
func UpdateFacilityLog ¶
func UpdateFacilityLog(w http.ResponseWriter, r *http.Request)
UpdateFacilityLog godoc @Summary Update a facility log entry @Description Update a facility log entry @Tags facility-log @Accept json @Produce json @Param id path string true "Facility Log Entry ID" @Param facility_log body Request true "Facility Log Entry" @Success 200 {object} Response @Failure 400 {object} utils.ErrResponse @Failure 404 {object} utils.ErrResponse @Failure 500 {object} utils.ErrResponse @Router /facility-log/{id} [put]
Types ¶
type Request ¶
type Response ¶
type Response struct {
*models.FacilityLogEntry
}
func NewFacilityLogEntryResponse ¶
func NewFacilityLogEntryResponse(fle *models.FacilityLogEntry) *Response