Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // base error OK = New(1, "success") RequestErr = New(20000, "网关校验缺少参数。") UserIDErr = New(30000, "用户身份验证失败。") DevIDErr = New(30001, "开发者身份验证失败。") SignErr = New(40000, "签名验证失败。") ServerErr = New(50000, "服务异常。") GatewayErr = New(50001, "网关异常。") ConfigParamErr = New(-1, "config missing parameter") )
Functions ¶
This section is empty.
Types ¶
type Codes ¶
type Codes interface { // sometimes Error return Code in string form Error() string // Code get error code. Code() int // Message get code message. Message() string }
Codes ecode error interface which has a code & message.
type Error ¶
type Error int
A Code is an int error code spec.
func (Error) GRPCStatus ¶ added in v1.5.11
Click to show internal directories.
Click to hide internal directories.