Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( OK = add(0) // 正确 NotModified = add(304) // 木有改动 TemporaryRedirect = add(307) // 撞车跳转 RequestErr = add(400) // 请求错误 AccessDenied = add(403) // 访问权限不足 NothingFound = add(404) // 啥都木有 MethodNotAllowed = add(405) // 不支持该方法 Conflict = add(409) // 冲突 Canceled = add(498) // 客户端取消请求 ServerErr = add(500) // 服务器错误 Deadline = add(504) // 服务调用超时 LimitExceed = add(509) // 超出限制 )
All common ecode
Functions ¶
Types ¶
type Code ¶
type Code int
A Code is an int error code spec.
type Codes ¶
type Codes interface { // sometimes Error return Code in string form // NOTE: don't use Error in monitor report even it also work for now Error() string // Code get error code. Code() int // Message get code message. Message() string //Detail get error detail,it may be nil. Details() []interface{} }
Codes ecode error interface which has a code & message.
Click to show internal directories.
Click to hide internal directories.