Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Common error group for general command errors. Common Group = 1000 // DIDExchange error group for DID exchange command errors. DIDExchange Group = 2000 // Messaging error group for messaging service errors. Messaging Group = 3000 // VDR error group for VDR command errors. VDR Group = 4000 // ROUTE error group for Route command errors. ROUTE Group = 5000 // VC error group for Verifiable Credential command errors. VC Group = 6000 // KMS error group for key management service errors. KMS Group = 7000 // IssueCredential error group for issue credential command errors. IssueCredential = 8000 // PresentProof error group for present proof command errors. PresentProof = 9000 // Introduce error group for introduce command errors. Introduce = 10000 // Outofband error group for outofband command errors. Outofband = 11000 // OutofbandV2 error group for outofband command errors. OutofbandV2 = 11100 // VCWallet error group for verifiable Credential wallet command errors. VCWallet = 12000 // RFC0593 error group for RFC0593 command errors. RFC0593 = 13000 // LD error group for JSON-LD command errors. LD = 14000 // Connection error group for connection management errors. Connection = 15000 // LegacyConnection error group for legacyconnection command errors. LegacyConnection = 16000 )
TODO command types shouldn't be mentioned in common error package, [Issue#1182].
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error interface { error // Code returns error code for this command error. Code() Code // Type returns error type for this command error. Type() Type }
Error is the interface for representing an command error condition, with the nil value representing no error.
func NewExecuteError ¶
NewExecuteError returns new command execute error.
func NewValidationError ¶
NewValidationError returns new command validation error.
type Group ¶
type Group int32
Group is the error groups. Note: recommended to use [0-9]*000 pattern for any new entries Example: 2000, 3000, 4000 ...... 25000.
type Handler ¶
type Handler interface { // name of the command Name() string // method name of the command Method() string // execute function of the command Handle() Exec }
Handler for each controller command.
type MessageHandler ¶
type MessageHandler interface { // Services returns list of available message services in this message handler Services() []dispatcher.MessageService // Register registers given message services to this message handler Register(msgSvcs ...dispatcher.MessageService) error // Unregister unregisters message service with given name from this message handler Unregister(name string) error }
MessageHandler maintains registered message services and it allows dynamic registration of message services.
Click to show internal directories.
Click to hide internal directories.