Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = NewError(0, "成功") Fail = NewError(10000000, "内部错误") InvalidParams = NewError(10000001, "无效参数") NotFound = NewError(10000003, "没有找到") Unknown = NewError(10000004, "未知") DeadlineExceeded = NewError(10000005, "超出最后截止期限") AccessDenied = NewError(10000006, "访问被拒绝") LimitExceed = NewError(10000007, "访问限制") MethodNotAllowed = NewError(10000008, "不支持该方法") )
Preset Error Codes
Functions ¶
Types ¶
type CommonStatus ¶
CommonStatus stands for GRPC status
func FromError ¶
func FromError(err error) *CommonStatus
FromError convert common error to GRPC status
Click to show internal directories.
Click to hide internal directories.