errors

package
v0.0.0-...-fb5fdcc Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error_name = map[int32]string{
		0:     "SUCCESS",
		40000: "PARAM_MISSING",
		40001: "PARAM_FORMAT",
		40100: "TOKEN_MISSING",
		40101: "TOKEN_INVALID",
		40102: "TOKEN_EXPIRE",
		40103: "TOKEN_BIND_INVALID",
		40104: "TOKEN_UNBIND",
		40401: "PAGE_NOT_FOUND",
		40402: "DATA_NOT_FOUND",
		50000: "SERVER_ERROR",
	}
	Error_value = map[string]int32{
		"SUCCESS":            0,
		"PARAM_MISSING":      40000,
		"PARAM_FORMAT":       40001,
		"TOKEN_MISSING":      40100,
		"TOKEN_INVALID":      40101,
		"TOKEN_EXPIRE":       40102,
		"TOKEN_BIND_INVALID": 40103,
		"TOKEN_UNBIND":       40104,
		"PAGE_NOT_FOUND":     40401,
		"DATA_NOT_FOUND":     40402,
		"SERVER_ERROR":       50000,
	}
)

Enum value maps for Error.

View Source
var File_errors_error_proto protoreflect.FileDescriptor

Functions

func ErrorDataNotFound

func ErrorDataNotFound(format string, args ...interface{}) *errors.Error

func ErrorPageNotFound

func ErrorPageNotFound(format string, args ...interface{}) *errors.Error

func ErrorParamFormat

func ErrorParamFormat(format string, args ...interface{}) *errors.Error

func ErrorParamMissing

func ErrorParamMissing(format string, args ...interface{}) *errors.Error

func ErrorServerError

func ErrorServerError(format string, args ...interface{}) *errors.Error

func ErrorSuccess

func ErrorSuccess(format string, args ...interface{}) *errors.Error

func ErrorTokenBindInvalid

func ErrorTokenBindInvalid(format string, args ...interface{}) *errors.Error

func ErrorTokenExpire

func ErrorTokenExpire(format string, args ...interface{}) *errors.Error

func ErrorTokenInvalid

func ErrorTokenInvalid(format string, args ...interface{}) *errors.Error

func ErrorTokenMissing

func ErrorTokenMissing(format string, args ...interface{}) *errors.Error

func ErrorTokenUnbind

func ErrorTokenUnbind(format string, args ...interface{}) *errors.Error

func IsDataNotFound

func IsDataNotFound(err error) bool

func IsPageNotFound

func IsPageNotFound(err error) bool

func IsParamFormat

func IsParamFormat(err error) bool

func IsParamMissing

func IsParamMissing(err error) bool

func IsServerError

func IsServerError(err error) bool

func IsSuccess

func IsSuccess(err error) bool

func IsTokenBindInvalid

func IsTokenBindInvalid(err error) bool

func IsTokenExpire

func IsTokenExpire(err error) bool

func IsTokenInvalid

func IsTokenInvalid(err error) bool

func IsTokenMissing

func IsTokenMissing(err error) bool

func IsTokenUnbind

func IsTokenUnbind(err error) bool

Types

type Error

type Error int32
const (
	Error_SUCCESS            Error = 0
	Error_PARAM_MISSING      Error = 40000
	Error_PARAM_FORMAT       Error = 40001
	Error_TOKEN_MISSING      Error = 40100
	Error_TOKEN_INVALID      Error = 40101
	Error_TOKEN_EXPIRE       Error = 40102
	Error_TOKEN_BIND_INVALID Error = 40103
	Error_TOKEN_UNBIND       Error = 40104
	Error_PAGE_NOT_FOUND     Error = 40401
	Error_DATA_NOT_FOUND     Error = 40402
	Error_SERVER_ERROR       Error = 50000
)

func (Error) Descriptor

func (Error) Descriptor() protoreflect.EnumDescriptor

func (Error) Enum

func (x Error) Enum() *Error

func (Error) EnumDescriptor deprecated

func (Error) EnumDescriptor() ([]byte, []int)

Deprecated: Use Error.Descriptor instead.

func (Error) Number

func (x Error) Number() protoreflect.EnumNumber

func (Error) String

func (x Error) String() string

func (Error) Type

func (Error) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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