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: 13 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) (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
	RespondToFunc            func(*didexchange.OOBInvitation, []string) (string, error)
	SaveFunc                 func(invitation *didexchange.OOBInvitation) error
	CreateConnRecordFunc     func(*connection.Record, *did.Doc) 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, conns []string) error

AcceptExchangeRequest accepts/approves exchange request.

func (*MockDIDExchangeSvc) AcceptInvitation

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

AcceptInvitation accepts/approves exchange invitation.

func (*MockDIDExchangeSvc) CreateConnection

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

CreateConnection saves the connection record.

func (*MockDIDExchangeSvc) CreateImplicitInvitation

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

CreateImplicitInvitation creates implicit invitation using public DID(s).

func (*MockDIDExchangeSvc) HandleInbound

func (m *MockDIDExchangeSvc) HandleInbound(msg service.DIDCommMsg, ctx service.DIDCommContext) (string, error)

HandleInbound msg.

func (*MockDIDExchangeSvc) HandleOutbound

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

HandleOutbound msg.

func (*MockDIDExchangeSvc) Initialize added in v0.1.8

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

Initialize service.

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

func (m *MockDIDExchangeSvc) RespondTo(i *didexchange.OOBInvitation, conns []string) (string, error)

RespondTo this invitation.

func (*MockDIDExchangeSvc) SaveInvitation

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

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 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 DID exchange service.

func (*MockProvider) OutboundDispatcher

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

OutboundDispatcher is mock outbound dispatcher for DID exchange service.

func (*MockProvider) ProtocolStateStorageProvider

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

ProtocolStateStorageProvider is mock protocol state storage provider for DID exchange service.

func (*MockProvider) StorageProvider

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

StorageProvider is mock storage provider for DID exchange service.

func (*MockProvider) VDRegistry added in v0.1.5

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