didexchange

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDIDExchangeSvc

type MockDIDExchangeSvc struct {
	ProtocolName             string
	HandleFunc               func(service.DIDCommMsg) (string, error)
	HandleOutboundFunc       func(msg service.DIDCommMsg, myDID, theirDID string) error
	AcceptFunc               func(string) bool
	RegisterActionEventErr   error
	UnregisterActionEventErr error
	RegisterMsgEventErr      error
	UnregisterMsgEventErr    error
	AcceptError              error
	ImplicitInvitationErr    error
	RespondToFunc            func(*didexchange.OOBInvitation) (string, error)
	SaveFunc                 func(invitation *didexchange.OOBInvitation) error
}

MockDIDExchangeSvc mock did exchange service

func (*MockDIDExchangeSvc) Accept

func (m *MockDIDExchangeSvc) Accept(msgType string) bool

Accept msg checks the msg type

func (*MockDIDExchangeSvc) AcceptExchangeRequest

func (m *MockDIDExchangeSvc) AcceptExchangeRequest(connectionID, publicDID, label string) error

AcceptExchangeRequest accepts/approves exchange request.

func (*MockDIDExchangeSvc) AcceptInvitation

func (m *MockDIDExchangeSvc) AcceptInvitation(connectionID, publicDID, label string) error

AcceptInvitation accepts/approves exchange invitation.

func (*MockDIDExchangeSvc) CreateImplicitInvitation

func (m *MockDIDExchangeSvc) CreateImplicitInvitation(inviterLabel, inviterDID, inviteeLabel, inviteeDID string) (string, error)

CreateImplicitInvitation creates implicit invitation using public DID(s)

func (*MockDIDExchangeSvc) HandleInbound

func (m *MockDIDExchangeSvc) HandleInbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)

HandleInbound msg

func (*MockDIDExchangeSvc) HandleOutbound

func (m *MockDIDExchangeSvc) HandleOutbound(msg service.DIDCommMsg, myDID, theirDID string) error

HandleOutbound msg

func (*MockDIDExchangeSvc) Name

func (m *MockDIDExchangeSvc) Name() string

Name return service name

func (*MockDIDExchangeSvc) RegisterActionEvent

func (m *MockDIDExchangeSvc) RegisterActionEvent(ch chan<- service.DIDCommAction) error

RegisterActionEvent register action event.

func (*MockDIDExchangeSvc) RegisterMsgEvent

func (m *MockDIDExchangeSvc) RegisterMsgEvent(ch chan<- service.StateMsg) error

RegisterMsgEvent register message event.

func (*MockDIDExchangeSvc) RespondTo added in v0.1.3

RespondTo this invitation.

func (*MockDIDExchangeSvc) SaveInvitation added in v0.1.3

func (m *MockDIDExchangeSvc) SaveInvitation(i *didexchange.OOBInvitation) error

SaveInvitation this invitation.

func (*MockDIDExchangeSvc) UnregisterActionEvent

func (m *MockDIDExchangeSvc) UnregisterActionEvent(ch chan<- service.DIDCommAction) error

UnregisterActionEvent unregister action event.

func (*MockDIDExchangeSvc) UnregisterMsgEvent

func (m *MockDIDExchangeSvc) UnregisterMsgEvent(ch chan<- service.StateMsg) error

UnregisterMsgEvent unregister message event.

type MockEventProperties added in v0.1.3

type MockEventProperties struct {
	ConnID string
	InvID  string
}

MockEventProperties is a didexchange.Event

func (*MockEventProperties) ConnectionID added in v0.1.3

func (m *MockEventProperties) ConnectionID() string

ConnectionID returns the connection id

func (*MockEventProperties) InvitationID added in v0.1.3

func (m *MockEventProperties) InvitationID() string

InvitationID returns the invitation id

type MockProvider

type MockProvider struct {
	StoreProvider          *mockstore.MockStoreProvider
	TransientStoreProvider *mockstore.MockStoreProvider
	CustomVDRI             vdriapi.Registry
}

MockProvider is provider for DIDExchange Service

func (*MockProvider) OutboundDispatcher

func (p *MockProvider) OutboundDispatcher() dispatcher.Outbound

OutboundDispatcher is mock outbound dispatcher for DID exchange service

func (*MockProvider) Signer

func (p *MockProvider) Signer() legacykms.Signer

Signer is mock signer for DID exchange service

func (*MockProvider) StorageProvider

func (p *MockProvider) StorageProvider() storage.Provider

StorageProvider is mock storage provider for DID exchange service

func (*MockProvider) TransientStorageProvider

func (p *MockProvider) TransientStorageProvider() storage.Provider

TransientStorageProvider is mock transient storage provider for DID exchange service

func (*MockProvider) VDRIRegistry

func (p *MockProvider) VDRIRegistry() vdriapi.Registry

VDRIRegistry is mock vdri registry

Jump to

Keyboard shortcuts

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