Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBody ¶
func DecodeBody(w http.ResponseWriter, r *http.Request, v interface{}) error
DecodeBody reads the json-encoded request body and stores it in the value pointed to by v if fails, writes error response and return error
func Error ¶
func Error(w http.ResponseWriter, err interface{}, code int)
Error prepares json error response
func Response ¶
func Response(w http.ResponseWriter, v interface{}, code int)
Response prepares json response Sets content type and response body
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.