Documentation
¶
Overview ¶
Package errcode contains the list of Berty error codes.
Index ¶
- Variables
- func Has(err error, code WithCode) bool
- func Is(err error, code WithCode) bool
- type ErrCode
- type ErrDetails
- func (*ErrDetails) Descriptor() ([]byte, []int)
- func (m *ErrDetails) GetCodes() []ErrCode
- func (*ErrDetails) ProtoMessage()
- func (m *ErrDetails) Reset()
- func (m *ErrDetails) String() string
- func (m *ErrDetails) XXX_DiscardUnknown()
- func (m *ErrDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ErrDetails) XXX_Merge(src proto.Message)
- func (m *ErrDetails) XXX_Size() int
- func (m *ErrDetails) XXX_Unmarshal(b []byte) error
- type WithCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCode_name = map[int32]string{
0: "Undefined",
666: "TODO",
777: "ErrNotImplemented",
888: "ErrInternal",
100: "ErrInvalidInput",
101: "ErrMissingInput",
102: "ErrSerialization",
103: "ErrDeserialization",
104: "ErrStreamRead",
105: "ErrStreamWrite",
106: "ErrMissingMapKey",
107: "ErrDBWrite",
108: "ErrDBRead",
200: "ErrCryptoRandomGeneration",
201: "ErrCryptoKeyGeneration",
202: "ErrCryptoNonceGeneration",
203: "ErrCryptoSignature",
204: "ErrCryptoSignatureVerification",
205: "ErrCryptoDecrypt",
206: "ErrCryptoEncrypt",
207: "ErrCryptoKeyConversion",
1000: "ErrOrbitDBInit",
1001: "ErrOrbitDBOpen",
1002: "ErrOrbitDBAppend",
1003: "ErrOrbitDBDeserialization",
1004: "ErrOrbitDBStoreCast",
1100: "ErrHandshakeOwnEphemeralKeyGenSend",
1101: "ErrHandshakePeerEphemeralKeyRecv",
1102: "ErrHandshakeRequesterAuthenticateBoxKeyGen",
1103: "ErrHandshakeResponderAcceptBoxKeyGen",
1104: "ErrHandshakeRequesterHello",
1105: "ErrHandshakeResponderHello",
1106: "ErrHandshakeRequesterAuthenticate",
1107: "ErrHandshakeResponderAccept",
1108: "ErrHandshakeRequesterAcknowledge",
1200: "ErrContactRequestSameAccount",
1201: "ErrContactRequestContactAlreadyAdded",
1202: "ErrContactRequestContactBlocked",
1203: "ErrContactRequestContactUndefined",
1204: "ErrContactRequestIncomingAlreadyReceived",
1300: "ErrGroupMemberLogEventOpen",
1301: "ErrGroupMemberLogEventSignature",
1302: "ErrGroupMemberUnknownGroupID",
1303: "ErrGroupSecretOtherDestMember",
1304: "ErrGroupSecretAlreadySentToMember",
1305: "ErrGroupInvalidType",
1306: "ErrGroupMissing",
1400: "ErrMessageKeyPersistencePut",
1401: "ErrMessageKeyPersistenceGet",
1500: "ErrBridgeInterrupted",
1501: "ErrBridgeNotRunning",
2000: "ErrMessengerInvalidDeepLink",
2100: "ErrDBEntryAlreadyExists",
2101: "ErrDBAddConversation",
2102: "ErrDBAddContactRequestOutgoingSent",
2103: "ErrDBAddContactRequestOutgoingEnqueud",
2104: "ErrDBAddContactRequestIncomingReceived",
2105: "ErrDBAddContactRequestIncomingAccepted",
2106: "ErrDBAddGroupMemberDeviceAdded",
2200: "ErrReplayProcessGroupMetadata",
2201: "ErrReplayProcessGroupMessage",
3001: "ErrCLINoTermcaps",
4000: "ErrServicesAuth",
4001: "ErrServicesAuthNotInitialized",
4002: "ErrServicesAuthWrongState",
4003: "ErrServicesAuthInvalidResponse",
4004: "ErrServicesAuthServer",
4005: "ErrServicesAuthCodeChallenge",
4006: "ErrServicesAuthServiceInvalidToken",
4007: "ErrServicesAuthServiceNotSupported",
4008: "ErrServicesAuthUnknownToken",
4009: "ErrServicesAuthInvalidURL",
}
View Source
var ErrCode_value = map[string]int32{
"Undefined": 0,
"TODO": 666,
"ErrNotImplemented": 777,
"ErrInternal": 888,
"ErrInvalidInput": 100,
"ErrMissingInput": 101,
"ErrSerialization": 102,
"ErrDeserialization": 103,
"ErrStreamRead": 104,
"ErrStreamWrite": 105,
"ErrMissingMapKey": 106,
"ErrDBWrite": 107,
"ErrDBRead": 108,
"ErrCryptoRandomGeneration": 200,
"ErrCryptoKeyGeneration": 201,
"ErrCryptoNonceGeneration": 202,
"ErrCryptoSignature": 203,
"ErrCryptoSignatureVerification": 204,
"ErrCryptoDecrypt": 205,
"ErrCryptoEncrypt": 206,
"ErrCryptoKeyConversion": 207,
"ErrOrbitDBInit": 1000,
"ErrOrbitDBOpen": 1001,
"ErrOrbitDBAppend": 1002,
"ErrOrbitDBDeserialization": 1003,
"ErrOrbitDBStoreCast": 1004,
"ErrHandshakeOwnEphemeralKeyGenSend": 1100,
"ErrHandshakePeerEphemeralKeyRecv": 1101,
"ErrHandshakeRequesterAuthenticateBoxKeyGen": 1102,
"ErrHandshakeResponderAcceptBoxKeyGen": 1103,
"ErrHandshakeRequesterHello": 1104,
"ErrHandshakeResponderHello": 1105,
"ErrHandshakeRequesterAuthenticate": 1106,
"ErrHandshakeResponderAccept": 1107,
"ErrHandshakeRequesterAcknowledge": 1108,
"ErrContactRequestSameAccount": 1200,
"ErrContactRequestContactAlreadyAdded": 1201,
"ErrContactRequestContactBlocked": 1202,
"ErrContactRequestContactUndefined": 1203,
"ErrContactRequestIncomingAlreadyReceived": 1204,
"ErrGroupMemberLogEventOpen": 1300,
"ErrGroupMemberLogEventSignature": 1301,
"ErrGroupMemberUnknownGroupID": 1302,
"ErrGroupSecretOtherDestMember": 1303,
"ErrGroupSecretAlreadySentToMember": 1304,
"ErrGroupInvalidType": 1305,
"ErrGroupMissing": 1306,
"ErrMessageKeyPersistencePut": 1400,
"ErrMessageKeyPersistenceGet": 1401,
"ErrBridgeInterrupted": 1500,
"ErrBridgeNotRunning": 1501,
"ErrMessengerInvalidDeepLink": 2000,
"ErrDBEntryAlreadyExists": 2100,
"ErrDBAddConversation": 2101,
"ErrDBAddContactRequestOutgoingSent": 2102,
"ErrDBAddContactRequestOutgoingEnqueud": 2103,
"ErrDBAddContactRequestIncomingReceived": 2104,
"ErrDBAddContactRequestIncomingAccepted": 2105,
"ErrDBAddGroupMemberDeviceAdded": 2106,
"ErrReplayProcessGroupMetadata": 2200,
"ErrReplayProcessGroupMessage": 2201,
"ErrCLINoTermcaps": 3001,
"ErrServicesAuth": 4000,
"ErrServicesAuthNotInitialized": 4001,
"ErrServicesAuthWrongState": 4002,
"ErrServicesAuthInvalidResponse": 4003,
"ErrServicesAuthServer": 4004,
"ErrServicesAuthCodeChallenge": 4005,
"ErrServicesAuthServiceInvalidToken": 4006,
"ErrServicesAuthServiceNotSupported": 4007,
"ErrServicesAuthUnknownToken": 4008,
"ErrServicesAuthInvalidURL": 4009,
}
Functions ¶
Types ¶
type ErrCode ¶
type ErrCode int32
const ( Undefined ErrCode = 0 TODO ErrCode = 666 ErrNotImplemented ErrCode = 777 ErrInternal ErrCode = 888 ErrInvalidInput ErrCode = 100 ErrMissingInput ErrCode = 101 ErrSerialization ErrCode = 102 ErrDeserialization ErrCode = 103 ErrStreamRead ErrCode = 104 ErrStreamWrite ErrCode = 105 ErrMissingMapKey ErrCode = 106 ErrDBWrite ErrCode = 107 ErrDBRead ErrCode = 108 ErrCryptoRandomGeneration ErrCode = 200 ErrCryptoKeyGeneration ErrCode = 201 ErrCryptoNonceGeneration ErrCode = 202 ErrCryptoSignature ErrCode = 203 ErrCryptoSignatureVerification ErrCode = 204 ErrCryptoDecrypt ErrCode = 205 ErrCryptoEncrypt ErrCode = 206 ErrCryptoKeyConversion ErrCode = 207 ErrOrbitDBInit ErrCode = 1000 ErrOrbitDBOpen ErrCode = 1001 ErrOrbitDBAppend ErrCode = 1002 ErrOrbitDBDeserialization ErrCode = 1003 ErrOrbitDBStoreCast ErrCode = 1004 ErrHandshakeOwnEphemeralKeyGenSend ErrCode = 1100 ErrHandshakePeerEphemeralKeyRecv ErrCode = 1101 ErrHandshakeRequesterAuthenticateBoxKeyGen ErrCode = 1102 ErrHandshakeResponderAcceptBoxKeyGen ErrCode = 1103 ErrHandshakeRequesterHello ErrCode = 1104 ErrHandshakeResponderHello ErrCode = 1105 ErrHandshakeRequesterAuthenticate ErrCode = 1106 ErrHandshakeResponderAccept ErrCode = 1107 ErrHandshakeRequesterAcknowledge ErrCode = 1108 ErrContactRequestSameAccount ErrCode = 1200 ErrContactRequestContactAlreadyAdded ErrCode = 1201 ErrContactRequestContactBlocked ErrCode = 1202 ErrContactRequestContactUndefined ErrCode = 1203 ErrContactRequestIncomingAlreadyReceived ErrCode = 1204 ErrGroupMemberLogEventOpen ErrCode = 1300 ErrGroupMemberLogEventSignature ErrCode = 1301 ErrGroupMemberUnknownGroupID ErrCode = 1302 ErrGroupSecretOtherDestMember ErrCode = 1303 ErrGroupSecretAlreadySentToMember ErrCode = 1304 ErrGroupInvalidType ErrCode = 1305 ErrGroupMissing ErrCode = 1306 ErrMessageKeyPersistencePut ErrCode = 1400 ErrMessageKeyPersistenceGet ErrCode = 1401 ErrBridgeInterrupted ErrCode = 1500 ErrBridgeNotRunning ErrCode = 1501 ErrMessengerInvalidDeepLink ErrCode = 2000 ErrDBEntryAlreadyExists ErrCode = 2100 ErrDBAddConversation ErrCode = 2101 ErrDBAddContactRequestOutgoingSent ErrCode = 2102 ErrDBAddContactRequestOutgoingEnqueud ErrCode = 2103 ErrDBAddContactRequestIncomingReceived ErrCode = 2104 ErrDBAddContactRequestIncomingAccepted ErrCode = 2105 ErrDBAddGroupMemberDeviceAdded ErrCode = 2106 ErrReplayProcessGroupMetadata ErrCode = 2200 ErrReplayProcessGroupMessage ErrCode = 2201 ErrCLINoTermcaps ErrCode = 3001 ErrServicesAuth ErrCode = 4000 ErrServicesAuthNotInitialized ErrCode = 4001 ErrServicesAuthWrongState ErrCode = 4002 ErrServicesAuthInvalidResponse ErrCode = 4003 ErrServicesAuthServer ErrCode = 4004 ErrServicesAuthCodeChallenge ErrCode = 4005 ErrServicesAuthServiceInvalidToken ErrCode = 4006 ErrServicesAuthServiceNotSupported ErrCode = 4007 ErrServicesAuthUnknownToken ErrCode = 4008 ErrServicesAuthInvalidURL ErrCode = 4009 )
func FirstCode ¶
FirstCode walks the passed error and returns the code of the first ErrCode met, or -1.
func (ErrCode) EnumDescriptor ¶
func (ErrCode) GRPCStatus ¶ added in v2.115.0
type ErrDetails ¶ added in v2.115.0
type ErrDetails struct { Codes []ErrCode `protobuf:"varint,1,rep,packed,name=codes,proto3,enum=berty.errcode.ErrCode" json:"codes,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ErrDetails) Descriptor ¶ added in v2.115.0
func (*ErrDetails) Descriptor() ([]byte, []int)
func (*ErrDetails) GetCodes ¶ added in v2.115.0
func (m *ErrDetails) GetCodes() []ErrCode
func (*ErrDetails) ProtoMessage ¶ added in v2.115.0
func (*ErrDetails) ProtoMessage()
func (*ErrDetails) Reset ¶ added in v2.115.0
func (m *ErrDetails) Reset()
func (*ErrDetails) String ¶ added in v2.115.0
func (m *ErrDetails) String() string
func (*ErrDetails) XXX_DiscardUnknown ¶ added in v2.115.0
func (m *ErrDetails) XXX_DiscardUnknown()
func (*ErrDetails) XXX_Marshal ¶ added in v2.115.0
func (m *ErrDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ErrDetails) XXX_Merge ¶ added in v2.115.0
func (m *ErrDetails) XXX_Merge(src proto.Message)
func (*ErrDetails) XXX_Size ¶ added in v2.115.0
func (m *ErrDetails) XXX_Size() int
func (*ErrDetails) XXX_Unmarshal ¶ added in v2.115.0
func (m *ErrDetails) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.