Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AcceptInvitation(i *Invitation) (string, error)
- func (c *Client) AcceptRequest(r *Request) (string, error)
- func (c *Client) CreateInvitation(protocols []string, opts ...MessageOption) (*Invitation, error)
- func (c *Client) CreateRequest(attchmnts []*decorator.Attachment, opts ...MessageOption) (*Request, error)
- type Event
- type Invitation
- type MessageOption
- type Provider
- type Request
Constants ¶
const ( // RequestMsgType is the request message's '@type'. RequestMsgType = outofband.RequestMsgType // InvitationMsgType is the '@type' for the invitation message. InvitationMsgType = outofband.InvitationMsgType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client for the Out-Of-Band protocol: https://github.com/hyperledger/aries-rfcs/blob/master/features/0434-outofband/README.md
func (*Client) AcceptInvitation ¶
func (c *Client) AcceptInvitation(i *Invitation) (string, error)
AcceptInvitation from another agent and return the ID of the new connection records.
func (*Client) AcceptRequest ¶
AcceptRequest from another agent and return the ID of a new connection record.
func (*Client) CreateInvitation ¶
func (c *Client) CreateInvitation(protocols []string, opts ...MessageOption) (*Invitation, error)
CreateInvitation creates and saves an out-of-band invitation. Protocols is an optional list of protocol identifier URIs that can be used to form connections. A default will be set if none are provided.
func (*Client) CreateRequest ¶
func (c *Client) CreateRequest(attchmnts []*decorator.Attachment, opts ...MessageOption) (*Request, error)
CreateRequest creates and saves an Out-Of-Band request message. At least one attachment must be provided. Service entries can be optionally provided. If none are provided then a new one will be automatically created for you.
type Event ¶
type Event interface {
// ConnectionID of the connection record, once it's created.
// This becomes available in a post-state event unless an error condition is encountered.
ConnectionID() string
// Error is non-nil if an error is encountered.
Error() error
}
Event is a container of out-of-band protocol-specific properties for DIDCommActions and StateMsgs.
type Invitation ¶
type Invitation outofband.Invitation
Invitation is this protocol's `invitation` message
type MessageOption ¶
type MessageOption func(*message) error
MessageOption allow you to customize the way out-of-band messages are built.
func WithGoal ¶
func WithGoal(goal, goalCode string) MessageOption
WithGoal allows you to specify the `goal` and `goalCode` for the message.
func WithLabel ¶
func WithLabel(l string) MessageOption
WithLabel allows you to specify the label on the message.
func WithServices ¶
func WithServices(svcs ...interface{}) MessageOption
WithServices allows you to specify service entries to include in the request message. Each entry must be either a valid DID (string) or a `service` object.