Documentation ¶
Index ¶
- func AuthHttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
- func GlobalErrorHandler(err error) (int, interface{})
- func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
- func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error)
- type NullJson
- type ResponseError
- type ResponseSuccess
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthHttpResult ¶
func AuthHttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
http auth error
func GlobalErrorHandler ¶
func HttpResult ¶
func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
http response
func ParamErrorResult ¶
func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error)
http param error
Types ¶
type ResponseError ¶
type ResponseSuccess ¶
type ResponseSuccess struct { Status uint32 `json:"status"` Code string `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func Success ¶
func Success(data interface{}) *ResponseSuccess
Click to show internal directories.
Click to hide internal directories.