Documentation ¶
Index ¶
- func BadRequest(w http.ResponseWriter, err error)
- func Created(w http.ResponseWriter, v interface{})
- func Forbidden(w http.ResponseWriter)
- func NoContent(w http.ResponseWriter)
- func NotFound(w http.ResponseWriter, err error)
- func OK(w http.ResponseWriter, v interface{})
- func ServerError(w http.ResponseWriter, err error)
- func Unauthorized(w http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadRequest ¶
func BadRequest(w http.ResponseWriter, err error)
BadRequest sends a JSON response with the status code 400.
func Created ¶
func Created(w http.ResponseWriter, v interface{})
Created sends a JSON response with the status code 201.
func Forbidden ¶
func Forbidden(w http.ResponseWriter)
Forbidden sends a JSON response with the status code 403.
func NoContent ¶
func NoContent(w http.ResponseWriter)
NoContent sends a JSON response with the status code 204.
func NotFound ¶
func NotFound(w http.ResponseWriter, err error)
NotFound sends a JSON response with the status code 404.
func OK ¶
func OK(w http.ResponseWriter, v interface{})
OK sends a JSON response with the status code 200.
func ServerError ¶
func ServerError(w http.ResponseWriter, err error)
ServerError sends a JSON response with the status code 500.
func Unauthorized ¶
func Unauthorized(w http.ResponseWriter)
Unauthorized sends a JSON response with the status code 401.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.