Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
func Write(w http.ResponseWriter, code ErrorCode)
Write writes the code as defined in the constants along with its error string
func WriteError ¶
func WriteError(w http.ResponseWriter, value interface{})
WriteError outputs the result as Error(1) and body=value
func WriteOk ¶
func WriteOk(w http.ResponseWriter)
WriteOk writes a successful reply to the ResponseWriter
func WriteValue ¶
func WriteValue(w http.ResponseWriter, value interface{})
WriteValue outputs the result as Ok(0) and body=value
func WriteValueCode ¶
func WriteValueCode(w http.ResponseWriter, code ErrorCode, value interface{})
WriteValueCode outputs the result as code=code and body=value
Types ¶
Click to show internal directories.
Click to hide internal directories.