Documentation ¶
Index ¶
- func MustWriteError(w http.ResponseWriter, m string, code int)
- func MustWriteForbidden(w http.ResponseWriter)
- func MustWriteInternalServerError(w http.ResponseWriter, m string, e error)
- func MustWriteJSON(w http.ResponseWriter, v any, code int)
- func MustWriteNoContent(w http.ResponseWriter)
- func MustWriteUnauthorized(w http.ResponseWriter, m string)
- func MustWriteUnprocessableEntity(w http.ResponseWriter, ve ValidationError)
- func ReadJSON(r *http.Request, v any) error
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustWriteError ¶
func MustWriteError(w http.ResponseWriter, m string, code int)
func MustWriteForbidden ¶
func MustWriteForbidden(w http.ResponseWriter)
func MustWriteInternalServerError ¶
func MustWriteInternalServerError(w http.ResponseWriter, m string, e error)
func MustWriteJSON ¶
func MustWriteJSON(w http.ResponseWriter, v any, code int)
func MustWriteNoContent ¶
func MustWriteNoContent(w http.ResponseWriter)
func MustWriteUnauthorized ¶
func MustWriteUnauthorized(w http.ResponseWriter, m string)
func MustWriteUnprocessableEntity ¶
func MustWriteUnprocessableEntity(w http.ResponseWriter, ve ValidationError)
Types ¶
type ValidationError ¶
type ValidationError []string
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.