didexchange

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockEventProperties

type MockEventProperties struct {
	ConnID     string
	InvID      string
	Properties map[string]interface{}
}

MockEventProperties is a didexchange.Event.

func (*MockEventProperties) All

func (m *MockEventProperties) All() map[string]interface{}

All returns all properties.

func (*MockEventProperties) ConnectionID

func (m *MockEventProperties) ConnectionID() string

ConnectionID returns the connection id.

func (*MockEventProperties) InvitationID

func (m *MockEventProperties) InvitationID() string

InvitationID returns the invitation id.

type MockLegacyConnectionSvc

type MockLegacyConnectionSvc struct {
	ProtocolName             string
	HandleFunc               func(service.DIDCommMsg) (string, error)
	HandleOutboundFunc       func(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
	AcceptFunc               func(string) bool
	RegisterActionEventErr   error
	UnregisterActionEventErr error
	RegisterMsgEventHandle   func(chan<- service.StateMsg) error
	RegisterMsgEventErr      error
	UnregisterMsgEventHandle func(chan<- service.StateMsg) error
	UnregisterMsgEventErr    error
	AcceptError              error
	ImplicitInvitationErr    error
	CreateConnRecordFunc     func(*connection.Record, *did.Doc) error
}

MockLegacyConnectionSvc mock legacy connection service.

func (*MockLegacyConnectionSvc) Accept

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

Accept msg checks the msg type.

func (*MockLegacyConnectionSvc) AcceptConnectionRequest

func (m *MockLegacyConnectionSvc) AcceptConnectionRequest(connectionID, publicDID, label string, conns []string) error

AcceptConnectionRequest accepts/approves exchange request.

func (*MockLegacyConnectionSvc) AcceptInvitation

func (m *MockLegacyConnectionSvc) AcceptInvitation(connectionID, publicDID, label string, conns []string) error

AcceptInvitation accepts/approves exchange invitation.

func (*MockLegacyConnectionSvc) CreateConnection

func (m *MockLegacyConnectionSvc) CreateConnection(r *connection.Record, theirDID *did.Doc) error

CreateConnection saves the connection record.

func (*MockLegacyConnectionSvc) CreateImplicitInvitation

func (m *MockLegacyConnectionSvc) CreateImplicitInvitation(inviterLabel, inviterDID, inviteeLabel, inviteeDID string, conns []string) (string, error)

CreateImplicitInvitation creates implicit invitation using public DID(s).

func (*MockLegacyConnectionSvc) HandleInbound

HandleInbound msg.

func (*MockLegacyConnectionSvc) HandleOutbound

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

HandleOutbound msg.

func (*MockLegacyConnectionSvc) Initialize

func (m *MockLegacyConnectionSvc) Initialize(interface{}) error

Initialize service.

func (*MockLegacyConnectionSvc) Name

func (m *MockLegacyConnectionSvc) Name() string

Name return service name.

func (*MockLegacyConnectionSvc) RegisterActionEvent

func (m *MockLegacyConnectionSvc) RegisterActionEvent(_ chan<- service.DIDCommAction) error

RegisterActionEvent register action event.

func (*MockLegacyConnectionSvc) RegisterMsgEvent

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

RegisterMsgEvent register message event.

func (*MockLegacyConnectionSvc) UnregisterActionEvent

func (m *MockLegacyConnectionSvc) UnregisterActionEvent(_ chan<- service.DIDCommAction) error

UnregisterActionEvent unregister action event.

func (*MockLegacyConnectionSvc) UnregisterMsgEvent

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

UnregisterMsgEvent unregister message event.

type MockProvider

type MockProvider struct {
	StoreProvider              *mockstore.MockStoreProvider
	ProtocolStateStoreProvider *mockstore.MockStoreProvider
	CustomVDR                  vdrapi.Registry
}

MockProvider is provider for DIDExchange Service.

func (*MockProvider) Crypto

func (p *MockProvider) Crypto() crypto.Crypto

Crypto is mock crypto service for legacy connection service.

func (*MockProvider) OutboundDispatcher

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

OutboundDispatcher is mock outbound dispatcher for legacy connection service.

func (*MockProvider) ProtocolStateStorageProvider

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

ProtocolStateStorageProvider is mock protocol state storage provider for legacy connection service.

func (*MockProvider) StorageProvider

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

StorageProvider is mock storage provider for legacy connection service.

func (*MockProvider) VDRegistry

func (p *MockProvider) VDRegistry() vdrapi.Registry

VDRegistry is mock vdr registry.

Jump to

Keyboard shortcuts

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