Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Success is the return code indicating "All went well, and (usually) some data was returned". Success = "success" // Fail is the return code indicating "There was a problem with the data submitted, or some pre-condition of the API call wasn't satisfied". Fail = "fail" // Error is the return code indicating "An error occurred in processing the request, i.e. an exception was thrown". Error = "error" )
Variables ¶
This section is empty.
Functions ¶
func JSONWrite ¶
func JSONWrite(w http.ResponseWriter, data interface{})
JSONWrite writes out data as JSON, sending headers and content length
func Send ¶
func Send(w http.ResponseWriter, status string, data interface{})
Send sends arbitrary data as a JSend response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.