Documentation
¶
Overview ¶
Package render handles the rending of common API results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Error ¶
func Error(w http.ResponseWriter, status int, err error)
Error writes an API error to the response.
func JSON ¶
func JSON(w http.ResponseWriter, status int, payload interface{})
JSON writes a payload as json to the response.
func JSONWithHeaders ¶
func JSONWithHeaders(w http.ResponseWriter, status int, headers map[string]string, payload interface{})
JSONWithHeaders writes a payload as json to the response and includes the provided headers.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.