Documentation ¶
Index ¶
- Constants
- type BatchPickupRequest
- type BatchPickupResponse
- type Command
- func (o *Command) BatchPickup(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Connections(rw io.Writer, req io.Reader) command.Error
- func (o *Command) GetHandlers() []command.Handler
- func (o *Command) Reconnect(rw io.Writer, req io.Reader) command.Error
- func (o *Command) ReconnectAll(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Register(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Status(rw io.Writer, req io.Reader) command.Error
- func (o *Command) Unregister(rw io.Writer, req io.Reader) command.Error
- type ConnectionsRequest
- type ConnectionsResponse
- type CreateInvitationRequest
- type CreateInvitationResponse
- type RegisterRoute
- type StatusRequest
- type StatusResponse
Constants ¶
const ( // InvalidRequestErrorCode for invalid requests. InvalidRequestErrorCode = command.Code(iota + command.ROUTE) // ResponseWriteErrorCode for connection ID validation error. RegisterMissingConnIDCode // RegisterRouterErrorCode for register router error. RegisterRouterErrorCode // UnregisterRouterErrorCode for unregister router error. UnregisterRouterErrorCode // GetConnectionsErrorCode for get connections error. GetConnectionsErrorCode // ReconnectMissingConnIDCode for connection ID validation error. ReconnectMissingConnIDCode // ReconnectRouterErrorCode for reconnecting router error. ReconnectRouterErrorCode // StatusRequestMissingConnIDCode for connection ID validation error. StatusRequestMissingConnIDCode // StatusRequestErrorCode for status request error. StatusRequestErrorCode // BatchPickupMissingConnIDCode for connection ID validation error. BatchPickupMissingConnIDCode // BatchPickupRequestErrorCode for batch pick up error. BatchPickupRequestErrorCode // ReconnectAllError is typically a code for mediator reconnectAll errors. ReconnectAllError )
Error codes.
const ( // command name. CommandName = "mediator" // command methods. RegisterCommandMethod = "Register" UnregisterCommandMethod = "Unregister" GetConnectionsCommandMethod = "Connections" ReconnectCommandMethod = "Reconnect" StatusCommandMethod = "Status" BatchPickupCommandMethod = "BatchPickup" ReconnectAllCommandMethod = "ReconnectAll" )
constant for the mediator controller.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchPickupRequest ¶
type BatchPickupRequest struct { // ConnectionID of connection for which pending messages needs to be dispatched. ConnectionID string `json:"connectionID"` // Size of batch of pending messages to be dispatched. Size int `json:"batch_size"` }
BatchPickupRequest is request for dispatching pending messages.
type BatchPickupResponse ¶
type BatchPickupResponse struct { // Count of messages dispatched. MessageCount int `json:"message_count"` }
BatchPickupResponse is response for dispatching pending messages.
type Command ¶
type Command struct {
// contains filtered or unexported fields
}
Command contains command operations provided by route controller.
func (*Command) BatchPickup ¶
BatchPickup dispatches pending messages for given connection.
func (*Command) Connections ¶ added in v0.1.5
Connections returns the connections of the router.
func (*Command) GetHandlers ¶
GetHandlers returns list of all commands supported by this controller command.
func (*Command) Reconnect ¶
Reconnect sends noop message to given connection to re-establish a network connection.
func (*Command) ReconnectAll ¶ added in v0.1.5
ReconnectAll performs reconnection on all available mediator connections. This command is useful in re-establishing lost connections (ex: lost websocket connection).
type ConnectionsRequest ¶ added in v0.1.9
type ConnectionsRequest struct { DIDCommV1Only bool `json:"didcomm_v1"` DIDCommV2Only bool `json:"didcomm_v2"` }
ConnectionsRequest contains parameters for filtering when requesting router connections.
type ConnectionsResponse ¶ added in v0.1.5
type ConnectionsResponse struct {
Connections []string `json:"connections"`
}
ConnectionsResponse is response for router`s connections.
type CreateInvitationRequest ¶ added in v0.1.5
type CreateInvitationRequest struct { Label string `json:"label"` Goal string `json:"goal"` GoalCode string `json:"goal_code"` Service []interface{} `json:"service"` Protocols []string `json:"protocols"` }
CreateInvitationRequest model
This is used for creating an invitation using mediator.
type CreateInvitationResponse ¶ added in v0.1.5
type CreateInvitationResponse struct { // Invitation is out-of-band invitation from mediator. Invitation *outofband.Invitation `json:"invitation"` }
CreateInvitationResponse model
Response for creating invitation through mediator.
type RegisterRoute ¶
type RegisterRoute struct {
ConnectionID string `json:"connectionID"`
}
RegisterRoute contains parameters for registering/reconnecting router.
type StatusRequest ¶
type StatusRequest struct {
ConnectionID string `json:"connectionID"`
}
StatusRequest is request for getting details about pending messages.
type StatusResponse ¶
type StatusResponse struct {
*messagepickup.Status
}
StatusResponse is status response containing details about pending messages.