Documentation ¶
Index ¶
- func BadRequest(slug string, err error, w http.ResponseWriter, r *http.Request)
- func InternalError(slug string, err error, w http.ResponseWriter, r *http.Request)
- func RespondWithSlugError(err error, w http.ResponseWriter, r *http.Request)
- func Unauthorized(slug string, err error, w http.ResponseWriter, r *http.Request)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func InternalError ¶
func RespondWithSlugError ¶
func RespondWithSlugError(err error, w http.ResponseWriter, r *http.Request)
func Unauthorized ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Slug string `json:"slug"` // contains filtered or unexported fields }
func (ErrorResponse) Render ¶
func (e ErrorResponse) Render(w http.ResponseWriter, _ *http.Request) error
Click to show internal directories.
Click to hide internal directories.