Documentation
¶
Overview ¶
Package jsend implements the JSend specification (https://labs.omniti.com/labs/jsend).
Index ¶
Constants ¶
View Source
const ( StatusSuccess = "success" StatusError = "error" StatusFail = "fail" )
Variables ¶
This section is empty.
Functions ¶
func Code ¶
func Code(c int) func(*jsendResponse)
Code is a functional option that sets the code field
func Data ¶
func Data(d map[string]interface{}) func(*jsendResponse)
Data is a functional option that sets the data field.
func Message ¶
func Message(m string) func(*jsendResponse)
Message is a functional option that sets the message field.
func StatusCode ¶
func StatusCode(c int) func(*jsendResponse)
StatusCode is a functional option that sets the status code to be used in the HTTP response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.