Documentation ¶
Index ¶
- func BadRequest(w http.ResponseWriter, err error)
- func InternalError(w http.ResponseWriter, err error)
- func NotFound(w http.ResponseWriter)
- func OK(w http.ResponseWriter)
- func ReadJSONBody(body io.ReadCloser, data interface{}) error
- func RespondJSON(w http.ResponseWriter, payload interface{})
- func RespondText(w http.ResponseWriter, text string)
- func Unauthorized(w http.ResponseWriter)
- type MethodNotAllowedHandler
- type NotFoundHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MethodNotAllowedHandler ¶
type MethodNotAllowedHandler struct { }
MethodNotAllowedHandler ...
func (*MethodNotAllowedHandler) ServeHTTP ¶
func (h *MethodNotAllowedHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type NotFoundHandler ¶
type NotFoundHandler struct { }
NotFoundHandler ...
func (*NotFoundHandler) ServeHTTP ¶
func (h *NotFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.