errcode

package
v2.108.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2020 License: Apache-2.0, MIT Imports: 4 Imported by: 5

Documentation

Overview

Package errcode contains the list of Berty error codes.

Index

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",
	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: "ErrGroupMemberLogEventOpen",
	1201: "ErrGroupMemberLogEventSignature",
	1202: "ErrGroupMemberUnknownGroupID",
	1203: "ErrGroupSecretOtherDestMember",
	1204: "ErrGroupSecretAlreadySentToMember",
	1205: "ErrGroupInvalidType",
	1206: "ErrGroupMissing",
	1300: "ErrMessageKeyPersistencePut",
	1301: "ErrMessageKeyPersistenceGet",
	1400: "ErrBridgeInterrupted",
	1401: "ErrBridgeNotRunning",
	2001: "ErrMessengerInvalidDeepLink",
	3001: "ErrCLINoTermcaps",
}
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,
	"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,
	"ErrGroupMemberLogEventOpen":                 1200,
	"ErrGroupMemberLogEventSignature":            1201,
	"ErrGroupMemberUnknownGroupID":               1202,
	"ErrGroupSecretOtherDestMember":              1203,
	"ErrGroupSecretAlreadySentToMember":          1204,
	"ErrGroupInvalidType":                        1205,
	"ErrGroupMissing":                            1206,
	"ErrMessageKeyPersistencePut":                1300,
	"ErrMessageKeyPersistenceGet":                1301,
	"ErrBridgeInterrupted":                       1400,
	"ErrBridgeNotRunning":                        1401,
	"ErrMessengerInvalidDeepLink":                2001,
	"ErrCLINoTermcaps":                           3001,
}

Functions

func Code

func Code(err error) int32

Code returns the code of the actual error without trying to unwrap it, or -1.

func FirstCode

func FirstCode(err error) int32

FirstCode walks the passed error and returns the code of the first ErrCode met, or -1.

func LastCode

func LastCode(err error) int32

LastCode walks the passed error and returns the code of the latest ErrCode, or -1.

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
	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
	ErrGroupMemberLogEventOpen                 ErrCode = 1200
	ErrGroupMemberLogEventSignature            ErrCode = 1201
	ErrGroupMemberUnknownGroupID               ErrCode = 1202
	ErrGroupSecretOtherDestMember              ErrCode = 1203
	ErrGroupSecretAlreadySentToMember          ErrCode = 1204
	ErrGroupInvalidType                        ErrCode = 1205
	ErrGroupMissing                            ErrCode = 1206
	ErrMessageKeyPersistencePut                ErrCode = 1300
	ErrMessageKeyPersistenceGet                ErrCode = 1301
	ErrBridgeInterrupted                       ErrCode = 1400
	ErrBridgeNotRunning                        ErrCode = 1401
	ErrMessengerInvalidDeepLink                ErrCode = 2001
	ErrCLINoTermcaps                           ErrCode = 3001
)

func (ErrCode) Code

func (e ErrCode) Code() int32

func (ErrCode) EnumDescriptor

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

func (ErrCode) Error

func (e ErrCode) Error() string

func (ErrCode) String

func (x ErrCode) String() string

func (ErrCode) Wrap

func (e ErrCode) Wrap(inner error) WithCode

type WithCode

type WithCode interface {
	error
	Code() int32
}

Jump to

Keyboard shortcuts

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