Documentation
¶
Overview ¶
Package result implements utilities for writing different data formats to http.ResponseWriter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONError ¶
func JSONError(w http.ResponseWriter, b *JSONErrorBody)
JSONError writes json error message wth specified http return code represented by JSONErrorBody to given http.ResponseWriter.
Types ¶
type JSONErrorBody ¶
type JSONErrorBody struct { Code int `json:"code"` Type string `json:"type"` Message string `json:"message"` }
JSONErrorBody implements arguments for JSONError function.
Click to show internal directories.
Click to hide internal directories.