Documentation ¶
Index ¶
- Variables
- func DefaultErrorS102AccessTokenIncorrect() *errors.Error
- func DefaultErrorS102HasBeenUsed() *errors.Error
- func DefaultErrorS102NoAvailableId() *errors.Error
- func DefaultErrorS102NodeIdIncorrect() *errors.Error
- func DefaultErrorS102NodeIdRenewalFailed() *errors.Error
- func DefaultErrorS102NodeIdStatusIncorrect() *errors.Error
- func DefaultErrorS102RecordAlreadyExist() *errors.Error
- func DefaultErrorS102RecordNotFount() *errors.Error
- func DefaultErrorUnknown() *errors.Error
- func ErrorS102AccessTokenIncorrect(format string, args ...interface{}) *errors.Error
- func ErrorS102HasBeenUsed(format string, args ...interface{}) *errors.Error
- func ErrorS102NoAvailableId(format string, args ...interface{}) *errors.Error
- func ErrorS102NodeIdIncorrect(format string, args ...interface{}) *errors.Error
- func ErrorS102NodeIdRenewalFailed(format string, args ...interface{}) *errors.Error
- func ErrorS102NodeIdStatusIncorrect(format string, args ...interface{}) *errors.Error
- func ErrorS102RecordAlreadyExist(format string, args ...interface{}) *errors.Error
- func ErrorS102RecordNotFount(format string, args ...interface{}) *errors.Error
- func ErrorUnknown(format string, args ...interface{}) *errors.Error
- func IsS102AccessTokenIncorrect(err error) bool
- func IsS102HasBeenUsed(err error) bool
- func IsS102NoAvailableId(err error) bool
- func IsS102NodeIdIncorrect(err error) bool
- func IsS102NodeIdRenewalFailed(err error) bool
- func IsS102NodeIdStatusIncorrect(err error) bool
- func IsS102RecordAlreadyExist(err error) bool
- func IsS102RecordNotFount(err error) bool
- func IsUnknown(err error) bool
- type ERROR
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 DefaultErrorS102NodeIdIncorrect ¶
节点ID信息不正确
func DefaultErrorS102NodeIdRenewalFailed ¶
节点ID续订失败
func DefaultErrorS102NodeIdStatusIncorrect ¶
节点状态不正确
func DefaultErrorS102RecordAlreadyExist ¶
节点ID已被使用
func ErrorS102AccessTokenIncorrect ¶
访问令牌不正确
func ErrorS102HasBeenUsed ¶
节点ID已被使用
func ErrorS102NoAvailableId ¶
没有可用的节点ID
func ErrorS102NodeIdIncorrect ¶
节点ID信息不正确
func ErrorS102NodeIdRenewalFailed ¶
节点ID续订失败
func ErrorS102NodeIdStatusIncorrect ¶
节点状态不正确
func ErrorS102RecordAlreadyExist ¶
节点ID已被使用
func ErrorS102RecordNotFount ¶
节点ID不存在
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) EnumDescriptor
deprecated
func (ERROR) Number ¶
func (x ERROR) Number() protoreflect.EnumNumber
func (ERROR) Type ¶
func (ERROR) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.