facility_log

package
v0.0.0-...-488514f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 Ctx

func Ctx(next http.Handler) http.Handler

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 Router

func Router(r chi.Router)

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 Request struct {
	Facility string `json:"facility" example:"ZDV" validate:"required,len=3"`
	Entry    string `json:"entry" example:"Changed Preferred OIs to RP" validate:"required"`
}

func (*Request) Bind

func (req *Request) Bind(r *http.Request) error

func (*Request) Validate

func (req *Request) Validate() error

type Response

type Response struct {
	*models.FacilityLogEntry
}

func NewFacilityLogEntryResponse

func NewFacilityLogEntryResponse(fle *models.FacilityLogEntry) *Response

func (*Response) Render

func (res *Response) Render(w http.ResponseWriter, r *http.Request) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL