errcode

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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