Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CodeNotFullySuccess 未完全成功 CodeNotFullySuccess = 203 // CodeNoPermissionErr 未授权访问 CodeNoPermissionErr = 403 // CodeNotFound 资源未找到 CodeNotFound = 404 // CodeDBError 数据库操作失败 CodeDBError = 50001 //CodeParamErr 各种奇奇怪怪的参数错误 CodeParamErr = 40001 // CodeNotSet 未定错误,后续尝试从error中获取 CodeNotSet = -1 )
三位数错误编码为复用http原本含义 五位数错误编码为应用自定义错误 五开头的五位数错误编码为服务器端错误,比如数据库操作失败 四开头的五位数错误编码为客户端错误,有时候是客户端代码写错了,有时候是用户操作错误
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.