errcode

package
Version: v0.6.16 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error_name = map[int32]string{
		0: "ERR_UNKNOWN",
		1: "ERR_INVALID_ARGUMENT",
		2: "ERR_NOT_FOUND",
		3: "ERR_DB_ERROR",
	}
	Error_value = map[string]int32{
		"ERR_UNKNOWN":          0,
		"ERR_INVALID_ARGUMENT": 1,
		"ERR_NOT_FOUND":        2,
		"ERR_DB_ERROR":         3,
	}
)

Enum value maps for Error.

View Source
var File_errcode_v1_errors_proto protoreflect.FileDescriptor

Functions

func ErrDbError

func ErrDbError() eerrors.Error

func ErrInvalidArgument

func ErrInvalidArgument() eerrors.Error

func ErrNotFound

func ErrNotFound() eerrors.Error

func ErrUnknown

func ErrUnknown() eerrors.Error

Types

type Error

type Error int32

错误

const (
	// 未知类型
	// @code=UNKNOWN
	Error_ERR_UNKNOWN Error = 0
	// 参数错误
	// @code=INVALID_ARGUMENT
	Error_ERR_INVALID_ARGUMENT Error = 1
	// 找不到资源
	// @code=NOT_FOUND
	Error_ERR_NOT_FOUND Error = 2
	// db错误
	// @code=INTERNAL
	Error_ERR_DB_ERROR Error = 3
)

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