Documentation ¶
Overview ¶
Package protocol provides useful mocks for testing different command controller features.
Index ¶
- type MockDIDExchangeSvc
- type MockMessenger
- type MockOobService
- func (m *MockOobService) AcceptInvitation(arg0 *outofband.Invitation, arg1 string, arg2 []string) (string, error)
- func (m *MockOobService) AcceptRequest(arg0 *outofband.Request, arg1 string, arg2 []string) (string, error)
- func (m *MockOobService) ActionContinue(arg0 string, arg1 outofband.Options) error
- func (m *MockOobService) ActionStop(arg0 string, arg1 error) error
- func (m *MockOobService) Actions() ([]outofband.Action, error)
- func (m *MockOobService) RegisterActionEvent(arg0 chan<- service.DIDCommAction) error
- func (m *MockOobService) RegisterMsgEvent(arg0 chan<- service.StateMsg) error
- func (m *MockOobService) SaveInvitation(arg0 *outofband.Invitation) error
- func (m *MockOobService) SaveRequest(arg0 *outofband.Request) error
- func (m *MockOobService) UnregisterActionEvent(arg0 chan<- service.DIDCommAction) error
- func (m *MockOobService) UnregisterMsgEvent(arg0 chan<- service.StateMsg) error
- type MockProvider
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.