Documentation ¶
Index ¶
- func AuthHttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
- func HttpResult(r *http.Request, w http.ResponseWriter, resp interface{}, err error)
- func JobResult(ctx context.Context, resp interface{}, err error)
- func ParamErrorResult(r *http.Request, w http.ResponseWriter, err error)
- type NullJson
- type ResponseErrorBean
- type ResponseSuccessBean
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方法
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 参数错误返回
Types ¶
type ResponseErrorBean ¶
func Error ¶
func Error(errCode uint32, errMsg string) *ResponseErrorBean
type ResponseSuccessBean ¶
type ResponseSuccessBean struct { Code uint32 `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.