Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Success = NewError(0, http.StatusOK, "成功") ServerError = NewError(10000001, http.StatusInternalServerError, "服务内部错误") UnknownError = NewError(10000002, http.StatusBadRequest, "未知错误") )
通用
View Source
var ()
认证
View Source
var ( ServiceNotFound = NewError(10005001, http.StatusBadRequest, "服务不存在") ServiceEmpty = NewError(10005002, http.StatusBadRequest, "无可用服务") )
服务发现
View Source
var (
InvalidParams = NewError(10004001, http.StatusBadRequest, "入参错误")
)
参数校验
View Source
var (
TooManyRequests = NewError(10003001, http.StatusTooManyRequests, "请求过于频繁")
)
限流
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (*Error) StatusCode ¶
func (*Error) WithDetails ¶
Click to show internal directories.
Click to hide internal directories.