Documentation ¶
Index ¶
- Constants
- type Command
- func (o *Command) GetHandlers() []command.Handler
- func (o *Command) RegisterHTTPService(rw io.Writer, req io.Reader) command.Error
- func (o *Command) RegisterService(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Reply(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Send(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Services(rw io.Writer, req io.Reader) command.Error
- func (o *Command) UnregisterService(rw io.Writer, req io.Reader) command.Error
- type RegisterHTTPMsgSvcArgs
- type RegisterMsgSvcArgs
- type RegisteredServicesResponse
- type SendNewMessageArgs
- type SendReplyMessageArgs
- type ServiceEndpointDestinationParams
- type UnregisterMsgSvcArgs
Constants ¶
const ( // InvalidRequestErrorCode is typically a code for invalid requests InvalidRequestErrorCode = command.Code(iota + command.Messaging) // RegisterMsgSvcError is for failures while registering new message service RegisterMsgSvcError // UnregisterMsgSvcError is for failures while unregistering a message service UnregisterMsgSvcError // SendMsgError is for failures while sending messages SendMsgError // SendMsgReplyError is for failures while sending message replies SendMsgReplyError )
Error codes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command contains basic command operations provided by messaging controller command
func New ¶
func New(ctx provider, registrar command.MessageHandler, notifier command.Notifier) (*Command, error)
New returns new command instance for messaging controller API
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command
func (*Command) RegisterHTTPService ¶
RegisterHTTPService registers new http over didcomm service to message handler registrar
func (*Command) RegisterService ¶
RegisterService registers new message service to message handler registrar
type RegisterHTTPMsgSvcArgs ¶
type RegisterHTTPMsgSvcArgs struct { // Name of the HTTP over DIDComm message service Name string `json:"name"` // Acceptance criteria for http over did comm message service based on message purpose. // In case of multiple purposes, operation will follow `A tagging system` purpose field validation from RFC-0351 // If not provided then all incoming messages of HTTP over DIDComm type will be handled by operation. Purpose []string `json:"purpose"` }
RegisterHTTPMsgSvcArgs contains parameters for registering a HTTP over DIDComm message service to message handler.
type RegisterMsgSvcArgs ¶
type RegisterMsgSvcArgs struct { // Name of the message service Name string `json:"name"` // Acceptance criteria for message service based on message purpose // in case of multiple purposes, message will be dispatched if any one of the purpose matches // with the purpose of incoming message. // Can be provided in conjunction with other acceptance criteria. Purpose []string `json:"purpose"` // Acceptance criteria for message service based on message type. // Can be provided in conjunction with other acceptance criteria. Type string `json:"type"` }
RegisterMsgSvcArgs contains parameters for registering a message service to message handler
type RegisteredServicesResponse ¶
type RegisteredServicesResponse struct { // Registered service names Names []string `json:"names"` }
RegisteredServicesResponse is for returning list of registered service names
type SendNewMessageArgs ¶
type SendNewMessageArgs struct { // Connection ID of the message destination // This parameter takes precedence over all the other destination parameters. ConnectionID string `json:"connection_ID,omitempty"` // DID of the destination. // This parameter takes precedence over `ServiceEndpoint` destination parameter. TheirDID string `json:"their_did,omitempty"` // ServiceEndpointDestination service endpoint destination. // This param can be used to send messages outside connection. ServiceEndpointDestination *ServiceEndpointDestinationParams `json:"service_endpoint,omitempty"` // Message body of the message MessageBody json.RawMessage `json:"message_body"` }
SendNewMessageArgs contains parameters for sending new message with one of three destination options below,
- ConnectionID - ID of the connection between sender and receiver of this message.
- TheirDID - TheirDID of the DID exchange connection record between sender and receiver of this message.
- ServiceEndpoint (With recipient Keys, endpoint and optional routing keys) - To Send message outside connection.
Note: Precedence logic when multiple destination options are provided are according to above order.
type SendReplyMessageArgs ¶
type SendReplyMessageArgs struct { // ID of the message replying to MessageID string `json:"message_ID"` // Message body of the reply message MessageBody json.RawMessage `json:"message_body"` }
SendReplyMessageArgs contains parameters for sending message reply
type ServiceEndpointDestinationParams ¶
type ServiceEndpointDestinationParams struct { // Recipient keys of service endpoint RecipientKeys []string `json:"recipientKeys,omitempty"` // Service endpoint ServiceEndpoint string `json:"serviceEndpoint,omitempty"` // Routing Keys of service endpoint RoutingKeys []string `json:"routingKeys,omitempty"` }
ServiceEndpointDestinationParams contains service endpoint params
type UnregisterMsgSvcArgs ¶
type UnregisterMsgSvcArgs struct { // Name of the message service to be unregistered // required: true Name string `json:"name"` }
UnregisterMsgSvcArgs contains parameters for unregistering a message service from message handler