Documentation ¶
Index ¶
- Constants
- type Action
- type Invitation
- type Options
- type Provider
- type Request
- type Service
- func (s *Service) Accept(msgType string) bool
- func (s *Service) AcceptInvitation(i *Invitation, myLabel string, routerConnections []string) (string, error)
- func (s *Service) AcceptRequest(r *Request, myLabel string, routerConnections []string) (string, error)
- func (s *Service) ActionContinue(piID string, opts Options) error
- func (s *Service) ActionStop(piID string, _ error) error
- func (s *Service) Actions() ([]Action, error)
- func (s *Service) HandleInbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
- func (s *Service) HandleOutbound(_ service.DIDCommMsg, _, _ string) (string, error)
- func (s *Service) Name() string
- func (s *Service) SaveInvitation(i *Invitation) error
- func (s *Service) SaveRequest(r *Request) error
Constants ¶
const ( // Name of this protocol service. Name = "out-of-band" // RequestMsgType is the '@type' for the request message. RequestMsgType = "https://didcomm.org/oob-request/1.0/request" // InvitationMsgType is the '@type' for the invitation message. InvitationMsgType = "https://didcomm.org/oob-invitation/1.0/invitation" // StateRequested is one of the possible states of this protocol. StateRequested = "requested" // StateInvited is this protocol's state after accepting an invitation. StateInvited = "invited" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶ added in v0.1.4
type Action struct { // Protocol instance ID PIID string Msg service.DIDCommMsgMap ProtocolName string MyDID string TheirDID string }
Action contains helpful information about action.
type Invitation ¶
type Invitation struct { ID string `json:"@id"` Type string `json:"@type"` Label string `json:"label,omitempty"` Goal string `json:"goal,omitempty"` GoalCode string `json:"goal-code,omitempty"` Service []interface{} `json:"service"` // Service is an array of either DIDs or 'service' block entries. Protocols []string `json:"protocols"` }
Invitation is this protocol's `invitation` message.
type Options ¶ added in v0.1.4
type Options interface { // MyLabel is the label to share with the other agent in the subsequent did-exchange. MyLabel() string RouterConnections() []string }
Options is a container for optional values provided by the user.
type Provider ¶
type Provider interface { Service(id string) (interface{}, error) StorageProvider() storage.Provider ProtocolStateStorageProvider() storage.Provider OutboundMessageHandler() service.OutboundHandler }
Provider provides this service's dependencies.
type Request ¶
type Request struct { ID string `json:"@id"` Type string `json:"@type"` Label string `json:"label,omitempty"` Goal string `json:"goal,omitempty"` GoalCode string `json:"goal-code,omitempty"` Requests []*decorator.Attachment `json:"request~attach"` Service []interface{} `json:"service"` // Service is an array of either DIDs or 'service' block entries. }
Request is this protocol's 'request' message.
type Service ¶
Service implements the Out-Of-Band protocol.
func (*Service) Accept ¶
Accept determines whether this service can handle the given type of message.
func (*Service) AcceptInvitation ¶
func (s *Service) AcceptInvitation(i *Invitation, myLabel string, routerConnections []string) (string, error)
AcceptInvitation from another agent and return the connection ID.
func (*Service) AcceptRequest ¶
func (s *Service) AcceptRequest(r *Request, myLabel string, routerConnections []string) (string, error)
AcceptRequest from another agent and return the connection ID.
func (*Service) ActionContinue ¶ added in v0.1.4
ActionContinue allows proceeding with the action by the piID.
func (*Service) ActionStop ¶ added in v0.1.4
ActionStop allows stopping the action by the piID.
func (*Service) HandleInbound ¶
HandleInbound handles inbound messages.
func (*Service) HandleOutbound ¶
HandleOutbound handles outbound messages.
func (*Service) SaveInvitation ¶
func (s *Service) SaveInvitation(i *Invitation) error
SaveInvitation created by the outofband client.
func (*Service) SaveRequest ¶
SaveRequest created by the outofband client.