Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error interface {
error
// Code returns error code for this command error.
Code() Code
// Code 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
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 // VDRI error group for VDRI command errors VDRI 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 )
TODO command types shouldn't be mentioned in common error package, [Issue#1182]
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.