Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpResult ¶
func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
http方法
func ParamErrorResult ¶
func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error)
http 参数错误返回
func TokenErrorResult ¶
func TokenErrorResult(r *http.Request, w http.ResponseWriter, err error)
http token错误
Types ¶
type ResponseErrorBean ¶
type ResponseErrorBean struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func Error ¶
func Error(errCode int, errMsg string) *ResponseErrorBean
type ResponseSuccessBean ¶
type ResponseSuccessBean struct { Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data"` }
func Success ¶
func Success(data interface{}) *ResponseSuccessBean
Click to show internal directories.
Click to hide internal directories.