didexchange

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	ActionEventFunc      func(chan<- service.DIDCommAction) error
	MsgEventFunc         func(chan<- service.StateMsg) error
	CreateInvWithDIDFunc func(string, string) (*didexchange.Invitation, error)
	CreateInvFunc        func(string) (*didexchange.Invitation, error)
	GetConnectionErr     error
	CreateConnectionFunc func(string, *did.Doc, ...didexchange.ConnectionOption) (string, error)
}

MockClient is a mock didexchange.MockClient used in tests.

func (*MockClient) CreateConnection

func (s *MockClient) CreateConnection(
	myDID string, theirDID *did.Doc, options ...didexchange.ConnectionOption) (string, error)

CreateConnection creates a didcomm connection between myDID and theirDID.

func (*MockClient) CreateInvitation

func (s *MockClient) CreateInvitation(label string) (*didexchange.Invitation, error)

CreateInvitation creates an explicit invitation.

func (*MockClient) CreateInvitationWithDID

func (s *MockClient) CreateInvitationWithDID(label, didID string) (*didexchange.Invitation, error)

CreateInvitationWithDID creates an implicit invitation with the given DID.

func (*MockClient) GetConnection added in v0.1.5

func (s *MockClient) GetConnection(connectionID string) (*didexchange.Connection, error)

GetConnection fetches connection record based on connID.

func (*MockClient) RegisterActionEvent

func (s *MockClient) RegisterActionEvent(actions chan<- service.DIDCommAction) error

RegisterActionEvent registers the action event channel.

func (*MockClient) RegisterMsgEvent

func (s *MockClient) RegisterMsgEvent(msgs chan<- service.StateMsg) error

RegisterMsgEvent registers the message event channel.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL