Documentation
¶
Index ¶
- type MockClient
- func (s *MockClient) RegisterActionEvent(ch chan<- service.DIDCommAction) error
- func (s *MockClient) RegisterMsgEvent(ch chan<- service.StateMsg) error
- func (s *MockClient) SendRequestPresentation(presentation *presentproof.RequestPresentation, connRec *connection.Record) (string, error)
- func (s *MockClient) UnregisterActionEvent(ch chan<- service.DIDCommAction) error
- func (s *MockClient) UnregisterMsgEvent(ch chan<- service.StateMsg) error
- type MockPresentProofSvc
- func (m *MockPresentProofSvc) Accept(msgType string) bool
- func (m *MockPresentProofSvc) ActionContinue(piID string, opt ...presentproof.Opt) error
- func (m *MockPresentProofSvc) ActionStop(piID string, err error, opt ...presentproof.Opt) error
- func (m *MockPresentProofSvc) Actions() ([]presentproof.Action, error)
- func (m *MockPresentProofSvc) HandleInbound(msg service.DIDCommMsg, _ service.DIDCommContext) (string, error)
- func (m *MockPresentProofSvc) HandleOutbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
- func (m *MockPresentProofSvc) Name() string
- func (m *MockPresentProofSvc) RegisterActionEvent(ch chan<- service.DIDCommAction) error
- func (m *MockPresentProofSvc) RegisterMsgEvent(ch chan<- service.StateMsg) error
- func (m *MockPresentProofSvc) UnregisterActionEvent(ch chan<- service.DIDCommAction) error
- func (m *MockPresentProofSvc) UnregisterMsgEvent(ch chan<- service.StateMsg) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct { RegisterActionFunc func(chan<- service.DIDCommAction) error RequestPresentationFunc func(*presentproof.RequestPresentation, *connection.Record) (string, error) }
MockClient is a mock presentproof.MockClient used in tests.
func (*MockClient) RegisterActionEvent ¶
func (s *MockClient) RegisterActionEvent(ch chan<- service.DIDCommAction) error
RegisterActionEvent registers the action event channel.
func (*MockClient) RegisterMsgEvent ¶
func (s *MockClient) RegisterMsgEvent(ch chan<- service.StateMsg) error
RegisterMsgEvent registers the message event channel.
func (*MockClient) SendRequestPresentation ¶
func (s *MockClient) SendRequestPresentation( presentation *presentproof.RequestPresentation, connRec *connection.Record) (string, error)
SendRequestPresentation simulates the action of sending a request presentation to theirDID.
func (*MockClient) UnregisterActionEvent ¶
func (s *MockClient) UnregisterActionEvent(ch chan<- service.DIDCommAction) error
UnregisterActionEvent unregisters the action channnel.
func (*MockClient) UnregisterMsgEvent ¶
func (s *MockClient) UnregisterMsgEvent(ch chan<- service.StateMsg) error
UnregisterMsgEvent unregisters the msg event channel.
type MockPresentProofSvc ¶
type MockPresentProofSvc 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 }
MockPresentProofSvc mock present proof service.
func (*MockPresentProofSvc) Accept ¶
func (m *MockPresentProofSvc) Accept(msgType string) bool
Accept msg checks the msg type.
func (*MockPresentProofSvc) ActionContinue ¶
func (m *MockPresentProofSvc) ActionContinue(piID string, opt ...presentproof.Opt) error
ActionContinue continues action.
func (*MockPresentProofSvc) ActionStop ¶
func (m *MockPresentProofSvc) ActionStop(piID string, err error, opt ...presentproof.Opt) error
ActionStop stops action.
func (*MockPresentProofSvc) Actions ¶
func (m *MockPresentProofSvc) Actions() ([]presentproof.Action, error)
Actions returns actions.
func (*MockPresentProofSvc) HandleInbound ¶
func (m *MockPresentProofSvc) HandleInbound(msg service.DIDCommMsg, _ service.DIDCommContext) (string, error)
HandleInbound msg.
func (*MockPresentProofSvc) HandleOutbound ¶
func (m *MockPresentProofSvc) HandleOutbound(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
HandleOutbound msg.
func (*MockPresentProofSvc) Name ¶
func (m *MockPresentProofSvc) Name() string
Name return service name.
func (*MockPresentProofSvc) RegisterActionEvent ¶
func (m *MockPresentProofSvc) RegisterActionEvent(ch chan<- service.DIDCommAction) error
RegisterActionEvent register action event.
func (*MockPresentProofSvc) RegisterMsgEvent ¶
func (m *MockPresentProofSvc) RegisterMsgEvent(ch chan<- service.StateMsg) error
RegisterMsgEvent register message event.
func (*MockPresentProofSvc) UnregisterActionEvent ¶
func (m *MockPresentProofSvc) UnregisterActionEvent(ch chan<- service.DIDCommAction) error
UnregisterActionEvent unregister action event.
func (*MockPresentProofSvc) UnregisterMsgEvent ¶
func (m *MockPresentProofSvc) UnregisterMsgEvent(ch chan<- service.StateMsg) error
UnregisterMsgEvent unregister message event.