errors

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorReason_name = map[int32]string{
		0:  "NotFound",
		1:  "Database",
		2:  "Metadata",
		3:  "Transform",
		4:  "GenCaptcha",
		5:  "VerifyCaptcha",
		6:  "NotRecord",
		7:  "RsaDecode",
		8:  "PasswordFormat",
		9:  "PasswordExpire",
		10: "UsernameOrPassword",
		15: "UserDisable",
		18: "GenToken",
		19: "ParseToken",
		20: "RefreshToken",
		21: "EmptyToken",
		22: "NotUserApp",
		23: "NotUserChannel",
		24: "NotApp",
		31: "NotAppChannel",
		25: "NotExistEmail",
		26: "AlreadyExistEmail",
		27: "AlreadyExistPhone",
		28: "AlreadyExistUsername",
		29: "Register",
		30: "Forbidden",
		32: "GetAuthInfo",
		33: "UnBind",
		34: "NotUser",
		35: "ResourceServer",
	}
	ErrorReason_value = map[string]int32{
		"NotFound":             0,
		"Database":             1,
		"Metadata":             2,
		"Transform":            3,
		"GenCaptcha":           4,
		"VerifyCaptcha":        5,
		"NotRecord":            6,
		"RsaDecode":            7,
		"PasswordFormat":       8,
		"PasswordExpire":       9,
		"UsernameOrPassword":   10,
		"UserDisable":          15,
		"GenToken":             18,
		"ParseToken":           19,
		"RefreshToken":         20,
		"EmptyToken":           21,
		"NotUserApp":           22,
		"NotUserChannel":       23,
		"NotApp":               24,
		"NotAppChannel":        31,
		"NotExistEmail":        25,
		"AlreadyExistEmail":    26,
		"AlreadyExistPhone":    27,
		"AlreadyExistUsername": 28,
		"Register":             29,
		"Forbidden":            30,
		"GetAuthInfo":          32,
		"UnBind":               33,
		"NotUser":              34,
		"ResourceServer":       35,
	}
)

Enum value maps for ErrorReason.

View Source
var File_user_center_error_reason_proto protoreflect.FileDescriptor

Functions

func AlreadyExistEmail

func AlreadyExistEmail() *errors.Error

func AlreadyExistEmailFormat

func AlreadyExistEmailFormat(format string, args ...any) *errors.Error

func AlreadyExistPhone

func AlreadyExistPhone() *errors.Error

func AlreadyExistPhoneFormat

func AlreadyExistPhoneFormat(format string, args ...any) *errors.Error

func AlreadyExistUsername

func AlreadyExistUsername() *errors.Error

func AlreadyExistUsernameFormat

func AlreadyExistUsernameFormat(format string, args ...any) *errors.Error

func Database

func Database() *errors.Error

func DatabaseFormat

func DatabaseFormat(format string, args ...any) *errors.Error

func EmptyToken

func EmptyToken() *errors.Error

func EmptyTokenFormat

func EmptyTokenFormat(format string, args ...any) *errors.Error

func Forbidden

func Forbidden() *errors.Error

func ForbiddenFormat

func ForbiddenFormat(format string, args ...any) *errors.Error

func GenCaptcha

func GenCaptcha() *errors.Error

func GenCaptchaFormat

func GenCaptchaFormat(format string, args ...any) *errors.Error

func GenToken

func GenToken() *errors.Error

func GenTokenFormat

func GenTokenFormat(format string, args ...any) *errors.Error

func GetAuthInfo

func GetAuthInfo() *errors.Error

func GetAuthInfoFormat

func GetAuthInfoFormat(format string, args ...any) *errors.Error

func IsAlreadyExistEmail

func IsAlreadyExistEmail(err error) bool

func IsAlreadyExistPhone

func IsAlreadyExistPhone(err error) bool

func IsAlreadyExistUsername

func IsAlreadyExistUsername(err error) bool

func IsDatabase

func IsDatabase(err error) bool

func IsEmptyToken

func IsEmptyToken(err error) bool

func IsForbidden

func IsForbidden(err error) bool

func IsGenCaptcha

func IsGenCaptcha(err error) bool

func IsGenToken

func IsGenToken(err error) bool

func IsGetAuthInfo

func IsGetAuthInfo(err error) bool

func IsMetadata

func IsMetadata(err error) bool

func IsNotApp

func IsNotApp(err error) bool

func IsNotAppChannel

func IsNotAppChannel(err error) bool

func IsNotExistEmail

func IsNotExistEmail(err error) bool

func IsNotFound

func IsNotFound(err error) bool

为某个枚举单独设置错误码

func IsNotRecord

func IsNotRecord(err error) bool

func IsNotUser

func IsNotUser(err error) bool

func IsNotUserApp

func IsNotUserApp(err error) bool

func IsNotUserChannel

func IsNotUserChannel(err error) bool

func IsParseToken

func IsParseToken(err error) bool

func IsPasswordExpire

func IsPasswordExpire(err error) bool

func IsPasswordFormat

func IsPasswordFormat(err error) bool

func IsRefreshToken

func IsRefreshToken(err error) bool

func IsRegister

func IsRegister(err error) bool

func IsResourceServer added in v1.0.7

func IsResourceServer(err error) bool

func IsRsaDecode

func IsRsaDecode(err error) bool

func IsTransform

func IsTransform(err error) bool

func IsUnBind

func IsUnBind(err error) bool

func IsUserDisable

func IsUserDisable(err error) bool

func IsUsernameOrPassword

func IsUsernameOrPassword(err error) bool

func IsVerifyCaptcha

func IsVerifyCaptcha(err error) bool

func Metadata

func Metadata() *errors.Error

func MetadataFormat

func MetadataFormat(format string, args ...any) *errors.Error

func NotApp

func NotApp() *errors.Error

func NotAppChannel

func NotAppChannel() *errors.Error

func NotAppChannelFormat

func NotAppChannelFormat(format string, args ...any) *errors.Error

func NotAppFormat

func NotAppFormat(format string, args ...any) *errors.Error

func NotExistEmail

func NotExistEmail() *errors.Error

func NotExistEmailFormat

func NotExistEmailFormat(format string, args ...any) *errors.Error

func NotFound

func NotFound() *errors.Error

为某个枚举单独设置错误码

func NotFoundFormat

func NotFoundFormat(format string, args ...any) *errors.Error

为某个枚举单独设置错误码

func NotRecord

func NotRecord() *errors.Error

func NotRecordFormat

func NotRecordFormat(format string, args ...any) *errors.Error

func NotUser

func NotUser() *errors.Error

func NotUserApp

func NotUserApp() *errors.Error

func NotUserAppFormat

func NotUserAppFormat(format string, args ...any) *errors.Error

func NotUserChannel

func NotUserChannel() *errors.Error

func NotUserChannelFormat

func NotUserChannelFormat(format string, args ...any) *errors.Error

func NotUserFormat

func NotUserFormat(format string, args ...any) *errors.Error

func ParseToken

func ParseToken() *errors.Error

func ParseTokenFormat

func ParseTokenFormat(format string, args ...any) *errors.Error

func PasswordExpire

func PasswordExpire() *errors.Error

func PasswordExpireFormat

func PasswordExpireFormat(format string, args ...any) *errors.Error

func PasswordFormat

func PasswordFormat() *errors.Error

func PasswordFormatFormat

func PasswordFormatFormat(format string, args ...any) *errors.Error

func RefreshToken

func RefreshToken() *errors.Error

func RefreshTokenFormat

func RefreshTokenFormat(format string, args ...any) *errors.Error

func Register

func Register() *errors.Error

func RegisterFormat

func RegisterFormat(format string, args ...any) *errors.Error

func ResourceServer added in v1.0.7

func ResourceServer() *errors.Error

func ResourceServerFormat added in v1.0.7

func ResourceServerFormat(format string, args ...any) *errors.Error

func RsaDecode

func RsaDecode() *errors.Error

func RsaDecodeFormat

func RsaDecodeFormat(format string, args ...any) *errors.Error

func Transform

func Transform() *errors.Error

func TransformFormat

func TransformFormat(format string, args ...any) *errors.Error

func UnBind

func UnBind() *errors.Error

func UnBindFormat

func UnBindFormat(format string, args ...any) *errors.Error

func UserDisable

func UserDisable() *errors.Error

func UserDisableFormat

func UserDisableFormat(format string, args ...any) *errors.Error

func UsernameOrPassword

func UsernameOrPassword() *errors.Error

func UsernameOrPasswordFormat

func UsernameOrPasswordFormat(format string, args ...any) *errors.Error

func VerifyCaptcha

func VerifyCaptcha() *errors.Error

func VerifyCaptchaFormat

func VerifyCaptchaFormat(format string, args ...any) *errors.Error

Types

type ErrorReason

type ErrorReason int32
const (
	// 为某个枚举单独设置错误码
	ErrorReason_NotFound             ErrorReason = 0
	ErrorReason_Database             ErrorReason = 1
	ErrorReason_Metadata             ErrorReason = 2
	ErrorReason_Transform            ErrorReason = 3
	ErrorReason_GenCaptcha           ErrorReason = 4
	ErrorReason_VerifyCaptcha        ErrorReason = 5
	ErrorReason_NotRecord            ErrorReason = 6
	ErrorReason_RsaDecode            ErrorReason = 7
	ErrorReason_PasswordFormat       ErrorReason = 8
	ErrorReason_PasswordExpire       ErrorReason = 9
	ErrorReason_UsernameOrPassword   ErrorReason = 10
	ErrorReason_UserDisable          ErrorReason = 15
	ErrorReason_GenToken             ErrorReason = 18
	ErrorReason_ParseToken           ErrorReason = 19
	ErrorReason_RefreshToken         ErrorReason = 20
	ErrorReason_EmptyToken           ErrorReason = 21
	ErrorReason_NotUserApp           ErrorReason = 22
	ErrorReason_NotUserChannel       ErrorReason = 23
	ErrorReason_NotApp               ErrorReason = 24
	ErrorReason_NotAppChannel        ErrorReason = 31
	ErrorReason_NotExistEmail        ErrorReason = 25
	ErrorReason_AlreadyExistEmail    ErrorReason = 26
	ErrorReason_AlreadyExistPhone    ErrorReason = 27
	ErrorReason_AlreadyExistUsername ErrorReason = 28
	ErrorReason_Register             ErrorReason = 29
	ErrorReason_Forbidden            ErrorReason = 30
	ErrorReason_GetAuthInfo          ErrorReason = 32
	ErrorReason_UnBind               ErrorReason = 33
	ErrorReason_NotUser              ErrorReason = 34
	ErrorReason_ResourceServer       ErrorReason = 35
)

func (ErrorReason) Descriptor

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL