Documentation
¶
Index ¶
- Constants
- type Invitation
- type Provider
- type Request
- type Service
- func (s *Service) Accept(msgType string) bool
- func (s *Service) AcceptInvitation(i *Invitation) (string, error)
- func (s *Service) AcceptRequest(r *Request) (string, error)
- func (s *Service) HandleInbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
- func (s *Service) HandleOutbound(_ service.DIDCommMsg, _, _ string) error
- func (s *Service) Name() string
- func (s *Service) SaveInvitation(i *Invitation) error
- func (s *Service) SaveRequest(r *Request) error
Constants ¶
View Source
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 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 Provider ¶
type Provider interface {
Service(id string) (interface{}, error)
StorageProvider() storage.Provider
TransientStorageProvider() 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) (string, error)
AcceptInvitation from another agent and return the connection ID.
func (*Service) AcceptRequest ¶
AcceptRequest from another agent and return the connection ID.
func (*Service) HandleInbound ¶
HandleInbound handles inbound messages
func (*Service) HandleOutbound ¶
func (s *Service) HandleOutbound(_ service.DIDCommMsg, _, _ string) error
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.
Click to show internal directories.
Click to hide internal directories.