error_code

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorCode_name = map[int32]string{
		0:     "CODE_SUCC",
		10000: "CODE_PARAM_ERR",
		10001: "CODE_DECODE_ERR",
		10002: "CODE_INTERNAL_ERR",
		10003: "CODE_PERMISSION_DENIED_ERR",
		10004: "CODE_NETWORK_ERR",
	}
	ErrorCode_value = map[string]int32{
		"CODE_SUCC":                  0,
		"CODE_PARAM_ERR":             10000,
		"CODE_DECODE_ERR":            10001,
		"CODE_INTERNAL_ERR":          10002,
		"CODE_PERMISSION_DENIED_ERR": 10003,
		"CODE_NETWORK_ERR":           10004,
	}
)

Enum value maps for ErrorCode.

View Source
var File_api_error_code_error_code_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ErrorCode

type ErrorCode int32
const (
	//成功
	ErrorCode_CODE_SUCC ErrorCode = 0
	//通用类错误码
	//参数错误
	ErrorCode_CODE_PARAM_ERR ErrorCode = 10000
	//解码转换错误
	ErrorCode_CODE_DECODE_ERR ErrorCode = 10001
	//服务器内部错误
	ErrorCode_CODE_INTERNAL_ERR ErrorCode = 10002
	//权限不足
	ErrorCode_CODE_PERMISSION_DENIED_ERR ErrorCode = 10003
	//网络错误
	ErrorCode_CODE_NETWORK_ERR ErrorCode = 10004 //具体业务错误码(每个服务分配一段)
)

func (ErrorCode) Descriptor

func (ErrorCode) Descriptor() protoreflect.EnumDescriptor

func (ErrorCode) Enum

func (x ErrorCode) Enum() *ErrorCode

func (ErrorCode) EnumDescriptor deprecated

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

Deprecated: Use ErrorCode.Descriptor instead.

func (ErrorCode) Number

func (x ErrorCode) Number() protoreflect.EnumNumber

func (ErrorCode) String

func (x ErrorCode) String() string

func (ErrorCode) Type

Jump to

Keyboard shortcuts

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