protocol

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package protocol provides useful mocks for testing different command controller features.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDIDExchangeSvc

type MockDIDExchangeSvc struct {
	*mockdidexchange.MockDIDExchangeSvc
	ConnID string
	State  string
}

MockDIDExchangeSvc is extension of aries mock did-exchange service.

func (*MockDIDExchangeSvc) RegisterMsgEvent

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

RegisterMsgEvent register message event.

type MockMessenger

type MockMessenger struct {
	*mocksvc.MockMessenger
	// contains filtered or unexported fields
}

MockMessenger mock implementation of messenger.

func NewMockMessenger

func NewMockMessenger() *MockMessenger

NewMockMessenger returns new mock messenger.

func (*MockMessenger) GetLastID

func (m *MockMessenger) GetLastID() string

GetLastID returns ID of the last message received.

func (*MockMessenger) ReplyToNested

func (m *MockMessenger) ReplyToNested(msg service.DIDCommMsgMap, opts *service.NestedReplyOpts) error

ReplyToNested mock messenger ReplyToNested.

func (*MockMessenger) Send

func (m *MockMessenger) Send(msg service.DIDCommMsgMap, myDID, theirDID string) error

Send mock messenger Send.

type MockOobService

type MockOobService struct {
	AcceptInvitationHandle func(*outofband.Invitation, string, []string) (string, error)
	SaveInvitationErr      error
}

MockOobService is a mock of OobService interface.

func (*MockOobService) AcceptInvitation

func (m *MockOobService) AcceptInvitation(arg0 *outofband.Invitation, arg1 string, arg2 []string) (string, error)

AcceptInvitation mock implementation.

func (*MockOobService) AcceptRequest

func (m *MockOobService) AcceptRequest(arg0 *outofband.Request, arg1 string, arg2 []string) (string, error)

AcceptRequest mock implementation.

func (*MockOobService) ActionContinue

func (m *MockOobService) ActionContinue(arg0 string, arg1 outofband.Options) error

ActionContinue mock implementation.

func (*MockOobService) ActionStop

func (m *MockOobService) ActionStop(arg0 string, arg1 error) error

ActionStop mock implementation.

func (*MockOobService) Actions

func (m *MockOobService) Actions() ([]outofband.Action, error)

Actions mock implementation.

func (*MockOobService) RegisterActionEvent

func (m *MockOobService) RegisterActionEvent(arg0 chan<- service.DIDCommAction) error

RegisterActionEvent mock implementation.

func (*MockOobService) RegisterMsgEvent

func (m *MockOobService) RegisterMsgEvent(arg0 chan<- service.StateMsg) error

RegisterMsgEvent mock implementation.

func (*MockOobService) SaveInvitation

func (m *MockOobService) SaveInvitation(arg0 *outofband.Invitation) error

SaveInvitation mock implementation.

func (*MockOobService) SaveRequest

func (m *MockOobService) SaveRequest(arg0 *outofband.Request) error

SaveRequest mock implementation.

func (*MockOobService) UnregisterActionEvent

func (m *MockOobService) UnregisterActionEvent(arg0 chan<- service.DIDCommAction) error

UnregisterActionEvent mock implementation.

func (*MockOobService) UnregisterMsgEvent

func (m *MockOobService) UnregisterMsgEvent(arg0 chan<- service.StateMsg) error

UnregisterMsgEvent mock implementation.

type MockProvider

type MockProvider struct {
	*protocol.MockProvider
	StoreProvider        storage.Provider
	ServiceEndpointValue string
	CustomMessenger      service.Messenger
}

MockProvider mock implementation of provider needed by sdk command controller.

func NewMockProvider

func NewMockProvider() *MockProvider

NewMockProvider returns mock implementation of basic provider.

func (*MockProvider) Messenger

func (p *MockProvider) Messenger() service.Messenger

Messenger return mock messenger.

func (*MockProvider) ServiceEndpoint

func (p *MockProvider) ServiceEndpoint() string

ServiceEndpoint returns the service endpoint.

func (*MockProvider) StorageProvider

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

StorageProvider returns the storage provider.

Jump to

Keyboard shortcuts

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