Documentation ¶
Index ¶
- Variables
- func ErrorForbidden(format string, args ...interface{}) *errors.Error
- func ErrorIdempotentMissingToken(format string, args ...interface{}) *errors.Error
- func ErrorIdempotentTokenExpired(format string, args ...interface{}) *errors.Error
- func ErrorInvalidParameter(format string, args ...interface{}) *errors.Error
- func ErrorNotFound(format string, args ...interface{}) *errors.Error
- func ErrorUnauthorized(format string, args ...interface{}) *errors.Error
- func ErrorUnknown(format string, args ...interface{}) *errors.Error
- func IsForbidden(err error) bool
- func IsIdempotentMissingToken(err error) bool
- func IsIdempotentTokenExpired(err error) bool
- func IsInvalidParameter(err error) bool
- func IsNotFound(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnknown(err error) bool
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorReason_name = map[int32]string{ 0: "Unknown", 1: "InvalidParameter", 2: "NotFound", 3: "Unauthorized", 4: "Forbidden", 5: "IdempotentMissingToken", 6: "IdempotentTokenExpired", } ErrorReason_value = map[string]int32{ "Unknown": 0, "InvalidParameter": 1, "NotFound": 2, "Unauthorized": 3, "Forbidden": 4, "IdempotentMissingToken": 5, "IdempotentTokenExpired": 6, } )
Enum value maps for ErrorReason.
View Source
var File_zerrors_zerrors_proto protoreflect.FileDescriptor
Functions ¶
func ErrorIdempotentMissingToken ¶
缺少幂等性令牌错误
func ErrorIdempotentTokenExpired ¶
幂等性令牌已过期错误
func ErrorInvalidParameter ¶
无效参数错误
func ErrorUnauthorized ¶
未经授权错误
func ErrorUnknown ¶
未知错误,服务器内部错误
Types ¶
type ErrorReason ¶
type ErrorReason int32
const ( // 未知错误,服务器内部错误 ErrorReason_Unknown ErrorReason = 0 // 无效参数错误 ErrorReason_InvalidParameter ErrorReason = 1 // 未找到错误 ErrorReason_NotFound ErrorReason = 2 ErrorReason_Unauthorized ErrorReason = 3 // 禁止访问错误 ErrorReason_Forbidden ErrorReason = 4 // 缺少幂等性令牌错误 ErrorReason_IdempotentMissingToken ErrorReason = 5 // 幂等性令牌已过期错误 ErrorReason_IdempotentTokenExpired ErrorReason = 6 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.