Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrSucc = &T{Code: CodeSucc, Msg: ErrMsg[CodeSucc], Data: nil} // 操作成功 ErrFail = &T{Code: CodeFail, Msg: ErrMsg[CodeFail], Data: nil} // 操作失败 ErrInternal = &T{Code: CodeInternal, Msg: ErrMsg[CodeInternal], Data: nil} // 内部错误 ErrParam = &T{Code: CodeParam, Msg: ErrMsg[CodeParam], Data: nil} // 参数错误 ErrAuth = &T{Code: CodeAuth, Msg: ErrMsg[CodeAuth], Data: nil} // 认证失败 ErrPerm = &T{Code: CodePerm, Msg: ErrMsg[CodePerm], Data: nil} // 无权限 ErrExist = &T{Code: CodeExist, Msg: ErrMsg[CodeExist], Data: nil} // 数据已存在 ErrNotFound = &T{Code: CodeNotFound, Msg: ErrMsg[CodeNotFound], Data: nil} // 数据未找到 ErrLimit = &T{Code: CodeLimit, Msg: ErrMsg[CodeLimit], Data: nil} // 已限制操作 ErrTimeout = &T{Code: CodeTimeout, Msg: ErrMsg[CodeTimeout], Data: nil} // 超时错误 ErrOther = &T{Code: CodeOther, Msg: ErrMsg[CodeOther], Data: nil} // 未知错误 ErrMethod = &T{Code: CodeMethod, Msg: ErrMsg[CodeMethod], Data: nil} // 方法错误 ErrTooManyReq = &T{Code: CodeTooManyReq, Msg: ErrMsg[CodeTooManyReq], Data: nil} // 请求频繁 ErrFileFormat = &T{Code: CodeFileFormat, Msg: ErrMsg[CodeFileFormat], Data: nil} // 文件格式错误 ErrEqual = &T{Code: CodeEqual, Msg: ErrMsg[CodeEqual], Data: nil} // 与原数据一致 ErrVersion = &T{Code: CodeVersion, Msg: ErrMsg[CodeVersion], Data: nil} // 版本错误 )
View Source
var ErrMsg = map[Code]Msg{ CodeSucc: "操作成功", CodeFail: "操作失败", CodeInternal: "内部错误", CodeParam: "参数错误", CodeAuth: "认证失败", CodePerm: "无权限", CodeExist: "数据已存在", CodeNotFound: "数据未找到", CodeLimit: "已限制操作", CodeTimeout: "超时错误", CodeOther: "未知错误", CodeMethod: "方法错误", CodeTooManyReq: "请求频繁", CodeFileFormat: "文件格式错误", CodeEqual: "与原数据一致", CodeVersion: "版本错误", }
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.