Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Forbidden ¶ added in v0.5.10
func Forbidden(rw http.ResponseWriter)
func Read ¶
func Read(rw http.ResponseWriter, r *http.Request, value interface{}) bool
Read decodes JSON from the HTTP request into the value provided. It uses go-validator to validate the incoming request body.
func WebsocketCloseSprintf ¶
WebsocketCloseSprintf formats a websocket close message and ensures it is truncated to the maximum allowed length.
func Write ¶
func Write(rw http.ResponseWriter, status int, response interface{})
Write outputs a standardized format to an HTTP response body.
Types ¶
Click to show internal directories.
Click to hide internal directories.