Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Send ¶
func Send(statusCode int, err error, result []byte, w http.ResponseWriter)
Send the HTTP response
func SendJSON ¶
func SendJSON(statusCode int, result interface{}, w http.ResponseWriter)
SendJSON the HTTP response
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Status int `json:"status,omitempty"` ErrorMessage string `json:"error,omitempty"` }
ErrorResponse defines error if in case any
Click to show internal directories.
Click to hide internal directories.