Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCodeName ¶
Types ¶
type Code ¶
type Code int32
通用错误码定义(0-100)
const ( OK Code = 0 Unknown Code = 1 // 未知错误 Canceled Code = 2 // 操作被取消 Aborted Code = 3 // 操作被终止 DeadlineExceeded Code = 5 // 过期超时 InvalidArgument Code = 6 // 参数错误 OutOfRange Code = 7 // 请求数据超出限制 RequestTimeout Code = 8 // 请求超时 BadRequest Code = 9 // 错误的请求 NotFound Code = 10 // 请求资源未找到 PermissionDenied Code = 11 // 权限不足 Unauthenticated Code = 12 // 未认证 ResourceExhausted Code = 13 // 资源已耗尽 NotImplemented Code = 14 // 请求未实现 AlreadyExists Code = 15 // entity已经存在 OperationNotSupported Code = 16 // 不支持的操作 OperationTooFrequent Code = 17 // 操作过于频繁 TransportFailure Code = 18 // 传输错误 DataLoss Code = 19 // unrecoverable data loss or corruption DatabaseError Code = 20 // 数据库异常 RuntimeException Code = 21 // 运行时错误 ServiceMaintenance Code = 22 // 服务维护中 InternalError Code = 23 // 内部错误 )
func GetCodeValue ¶
Click to show internal directories.
Click to hide internal directories.