Documentation ¶
Index ¶
- Variables
- func ErrorBusinessError(format string, args ...interface{}) *errors.Error
- func ErrorConflictError(format string, args ...interface{}) *errors.Error
- func ErrorNotAuthority(format string, args ...interface{}) *errors.Error
- func ErrorNotLogin(format string, args ...interface{}) *errors.Error
- func ErrorParamsError(format string, args ...interface{}) *errors.Error
- func ErrorPreconditionRequired(format string, args ...interface{}) *errors.Error
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func IsBusinessError(err error) bool
- func IsConflictError(err error) bool
- func IsNotAuthority(err error) bool
- func IsNotLogin(err error) bool
- func IsParamsError(err error) bool
- func IsPreconditionRequired(err error) bool
- func IsUnknownError(err error) bool
- type AuthErrorReason
- func (AuthErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x AuthErrorReason) Enum() *AuthErrorReason
- func (AuthErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x AuthErrorReason) Number() protoreflect.EnumNumber
- func (x AuthErrorReason) String() string
- func (AuthErrorReason) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AuthErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", 3: "BUSINESS_ERROR", 1: "NOT_LOGIN", 2: "NOT_AUTHORITY", 8: "CONFLICT_ERROR", 6: "PARAMS_ERROR", 7: "PRECONDITION_REQUIRED", } AuthErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, "BUSINESS_ERROR": 3, "NOT_LOGIN": 1, "NOT_AUTHORITY": 2, "CONFLICT_ERROR": 8, "PARAMS_ERROR": 6, "PRECONDITION_REQUIRED": 7, } )
Enum value maps for AuthErrorReason.
View Source
var File_api_errors_error_proto protoreflect.FileDescriptor
Functions ¶
func ErrorBusinessError ¶
func ErrorConflictError ¶
func ErrorNotAuthority ¶
func ErrorNotLogin ¶
func ErrorParamsError ¶
func ErrorUnknownError ¶
func IsBusinessError ¶
func IsConflictError ¶
func IsNotAuthority ¶
func IsNotLogin ¶
func IsParamsError ¶
func IsPreconditionRequired ¶
func IsUnknownError ¶
Types ¶
type AuthErrorReason ¶
type AuthErrorReason int32
异常错误
const ( AuthErrorReason_UNKNOWN_ERROR AuthErrorReason = 0 // 业务错误 AuthErrorReason_BUSINESS_ERROR AuthErrorReason = 3 // 未登陆 AuthErrorReason_NOT_LOGIN AuthErrorReason = 1 // 无权限 AuthErrorReason_NOT_AUTHORITY AuthErrorReason = 2 // 资源冲突 AuthErrorReason_CONFLICT_ERROR AuthErrorReason = 8 // 参数错误 AuthErrorReason_PARAMS_ERROR AuthErrorReason = 6 // 请求需要先决条件 AuthErrorReason_PRECONDITION_REQUIRED AuthErrorReason = 7 )
func (AuthErrorReason) Descriptor ¶
func (AuthErrorReason) Descriptor() protoreflect.EnumDescriptor
func (AuthErrorReason) Enum ¶
func (x AuthErrorReason) Enum() *AuthErrorReason
func (AuthErrorReason) EnumDescriptor
deprecated
func (AuthErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use AuthErrorReason.Descriptor instead.
func (AuthErrorReason) Number ¶
func (x AuthErrorReason) Number() protoreflect.EnumNumber
func (AuthErrorReason) String ¶
func (x AuthErrorReason) String() string
func (AuthErrorReason) Type ¶
func (AuthErrorReason) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.