Documentation ¶
Index ¶
- func SendBadParamError(w http.ResponseWriter, p []ParamError)
- func SendGenericError(w http.ResponseWriter, code int, msg string)
- func SendOKResponse(w http.ResponseWriter, b interface{})
- func SendResponse(w http.ResponseWriter, code int, b interface{})
- type BadParamError
- type ErrorResponse
- type ParamError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendBadParamError ¶
func SendBadParamError(w http.ResponseWriter, p []ParamError)
func SendGenericError ¶
func SendGenericError(w http.ResponseWriter, code int, msg string)
func SendOKResponse ¶
func SendOKResponse(w http.ResponseWriter, b interface{})
func SendResponse ¶
func SendResponse(w http.ResponseWriter, code int, b interface{})
Types ¶
type BadParamError ¶
type BadParamError struct { Fields []ParamError `json:"fields"` ErrorCode int `json:"errorCode"` }
type ErrorResponse ¶
type ParamError ¶
type ParamError struct { Param string `json:"param"` Message string `json:"message"` Type string `json:"type"` }
func Validator ¶
func Validator(s interface{}) []ParamError
Click to show internal directories.
Click to hide internal directories.