Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteCustomJSON ¶
func WriteCustomJSON(respWriter http.ResponseWriter, resp interface{})
WriteCustomJSON will write the custom response to the http response writer as json
func WriteError ¶
func WriteError(respWriter http.ResponseWriter, errorString string)
WriteError will write the passed error to the http response writer
func WriteSuccess ¶
func WriteSuccess(respWriter http.ResponseWriter, optionalMessage string)
WriteSuccess will write the a success status and optional message to the http response writer
Types ¶
type SGTCustomResponse ¶
type SGTCustomResponse map[string]interface{}
SGTCustomResponse is an alias for a map that allows for storing custom endpoint response values
Click to show internal directories.
Click to hide internal directories.