Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorCode = map[string]ErrorValue{
"success": {Code: 0, Msg: "", Log: ""},
"SerError": {Code: 100001, Msg: "服务请求失败!", Log: "服务【%s】请求失败:%s"},
"SerResEmpty": {Code: 100002, Msg: "服务请求返回为空!", Log: "服务【%s】请求返回为空!"},
"SerResJosnError": {Code: 100003, Msg: "服务请求返回内容错误!", Log: "服务【%s】请求返回内容错误:%s"},
}
ErrorCode 全局返回码
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Code int `json:"code"` Data interface{} `json:"data,omitempty"` ErrMsg interface{} `json:"errmsg,omitempty"` }
Response 接口输出类
func NewErrorResponse ¶
NewErrorResponse 错误 Response
func NewResponse ¶
NewResponse 自定义 Response
Click to show internal directories.
Click to hide internal directories.