errorv1

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_name = map[int32]string{
		0:         "UNKNOWN",
		102000001: "S102_NO_AVAILABLE_ID",
		102000002: "S102_RECORD_NOT_FOUNT",
		102000003: "S102_RECORD_ALREADY_EXIST",
		102000004: "S102_HAS_BEEN_USED",
		102000005: "S102_NODE_ID_RENEWAL_FAILED",
		102000006: "S102_NODE_ID_INCORRECT",
		102000007: "S102_ACCESS_TOKEN_INCORRECT",
		102000008: "S102_NODE_ID_STATUS_INCORRECT",
	}
	ERROR_value = map[string]int32{
		"UNKNOWN":                       0,
		"S102_NO_AVAILABLE_ID":          102000001,
		"S102_RECORD_NOT_FOUNT":         102000002,
		"S102_RECORD_ALREADY_EXIST":     102000003,
		"S102_HAS_BEEN_USED":            102000004,
		"S102_NODE_ID_RENEWAL_FAILED":   102000005,
		"S102_NODE_ID_INCORRECT":        102000006,
		"S102_ACCESS_TOKEN_INCORRECT":   102000007,
		"S102_NODE_ID_STATUS_INCORRECT": 102000008,
	}
)

Enum value maps for ERROR.

View Source
var ERROR_http_code = map[string]int{

	"UNKNOWN":                       500,
	"S102_NO_AVAILABLE_ID":          400,
	"S102_RECORD_NOT_FOUNT":         400,
	"S102_RECORD_ALREADY_EXIST":     400,
	"S102_HAS_BEEN_USED":            400,
	"S102_NODE_ID_RENEWAL_FAILED":   400,
	"S102_NODE_ID_INCORRECT":        400,
	"S102_ACCESS_TOKEN_INCORRECT":   400,
	"S102_NODE_ID_STATUS_INCORRECT": 400,
}
View Source
var File_api_nodeid_service_v1_errors_node_id_error_v1_proto protoreflect.FileDescriptor

Functions

func DefaultErrorS102AccessTokenIncorrect

func DefaultErrorS102AccessTokenIncorrect() *errors.Error

访问令牌不正确

func DefaultErrorS102HasBeenUsed

func DefaultErrorS102HasBeenUsed() *errors.Error

节点ID已被使用

func DefaultErrorS102NoAvailableId

func DefaultErrorS102NoAvailableId() *errors.Error

没有可用的节点ID

func DefaultErrorS102NodeIdIncorrect

func DefaultErrorS102NodeIdIncorrect() *errors.Error

节点ID信息不正确

func DefaultErrorS102NodeIdRenewalFailed

func DefaultErrorS102NodeIdRenewalFailed() *errors.Error

节点ID续订失败

func DefaultErrorS102NodeIdStatusIncorrect

func DefaultErrorS102NodeIdStatusIncorrect() *errors.Error

节点状态不正确

func DefaultErrorS102RecordAlreadyExist

func DefaultErrorS102RecordAlreadyExist() *errors.Error

节点ID已被使用

func DefaultErrorS102RecordNotFount

func DefaultErrorS102RecordNotFount() *errors.Error

节点ID不存在

func DefaultErrorUnknown

func DefaultErrorUnknown() *errors.Error

未知错误

func ErrorS102AccessTokenIncorrect

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

访问令牌不正确

func ErrorS102HasBeenUsed

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

节点ID已被使用

func ErrorS102NoAvailableId

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

没有可用的节点ID

func ErrorS102NodeIdIncorrect

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

节点ID信息不正确

func ErrorS102NodeIdRenewalFailed

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

节点ID续订失败

func ErrorS102NodeIdStatusIncorrect

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

节点状态不正确

func ErrorS102RecordAlreadyExist

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

节点ID已被使用

func ErrorS102RecordNotFount

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

节点ID不存在

func ErrorUnknown

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

未知错误

func IsS102AccessTokenIncorrect

func IsS102AccessTokenIncorrect(err error) bool

访问令牌不正确

func IsS102HasBeenUsed

func IsS102HasBeenUsed(err error) bool

节点ID已被使用

func IsS102NoAvailableId

func IsS102NoAvailableId(err error) bool

没有可用的节点ID

func IsS102NodeIdIncorrect

func IsS102NodeIdIncorrect(err error) bool

节点ID信息不正确

func IsS102NodeIdRenewalFailed

func IsS102NodeIdRenewalFailed(err error) bool

节点ID续订失败

func IsS102NodeIdStatusIncorrect

func IsS102NodeIdStatusIncorrect(err error) bool

节点状态不正确

func IsS102RecordAlreadyExist

func IsS102RecordAlreadyExist(err error) bool

节点ID已被使用

func IsS102RecordNotFount

func IsS102RecordNotFount(err error) bool

节点ID不存在

func IsUnknown

func IsUnknown(err error) bool

未知错误

Types

type ERROR

type ERROR int32

ERROR 错误码用9位数字表示,其中前3位与服务序号保持一致,第4为使用0作为分隔占位,后5位用于表示具体错误码的枚举值

const (
	ERROR_UNKNOWN                       ERROR = 0         // 未知错误
	ERROR_S102_NO_AVAILABLE_ID          ERROR = 102000001 // 没有可用的节点ID
	ERROR_S102_RECORD_NOT_FOUNT         ERROR = 102000002 // 节点ID不存在
	ERROR_S102_RECORD_ALREADY_EXIST     ERROR = 102000003 // 节点ID已被使用
	ERROR_S102_HAS_BEEN_USED            ERROR = 102000004 // 节点ID已被使用
	ERROR_S102_NODE_ID_RENEWAL_FAILED   ERROR = 102000005 // 节点ID续订失败
	ERROR_S102_NODE_ID_INCORRECT        ERROR = 102000006 // 节点ID信息不正确
	ERROR_S102_ACCESS_TOKEN_INCORRECT   ERROR = 102000007 // 访问令牌不正确
	ERROR_S102_NODE_ID_STATUS_INCORRECT ERROR = 102000008 // 节点状态不正确
)

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) HTTPCode

func (x ERROR) HTTPCode() int

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