mediator

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMediatorSvc

type MockMediatorSvc struct {
	service.Action
	service.Message
	ProtocolName       string
	HandleFunc         func(service.DIDCommMsg) (string, error)
	HandleOutboundFunc func(msg service.DIDCommMsg, myDID, theirDID string) (string, error)
	AcceptFunc         func(string) bool
	RegisterFunc       func(connectionID string, options ...mediator.ClientOption) error
	RouterEndpoint     string
	RoutingKeys        []string
	ConfigErr          error
	AddKeyErr          error
	UnregisterErr      error
	Connections        []string
	GetConnectionsErr  error
	AddKeyFunc         func(string) error
}

MockMediatorSvc mock route service.

func (*MockMediatorSvc) Accept

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

Accept msg checks the msg type.

func (*MockMediatorSvc) AddKey

func (m *MockMediatorSvc) AddKey(connID, recKey string) error

AddKey adds agents recKey to the router.

func (*MockMediatorSvc) Config

func (m *MockMediatorSvc) Config(connID string) (*mediator.Config, error)

Config gives back the router configuration.

func (*MockMediatorSvc) GetConnections added in v0.1.5

func (m *MockMediatorSvc) GetConnections(...mediator.ConnectionOption) ([]string, error)

GetConnections returns router`s connections.

func (*MockMediatorSvc) HandleInbound

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

HandleInbound msg.

func (*MockMediatorSvc) HandleOutbound

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

HandleOutbound msg.

func (*MockMediatorSvc) Initialize added in v0.1.8

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

Initialize service.

func (*MockMediatorSvc) Name

func (m *MockMediatorSvc) Name() string

Name return service name.

func (*MockMediatorSvc) Register

func (m *MockMediatorSvc) Register(connectionID string, options ...mediator.ClientOption) error

Register registers agent with the router.

func (*MockMediatorSvc) Unregister

func (m *MockMediatorSvc) Unregister(connID string) error

Unregister unregisters the router.

Jump to

Keyboard shortcuts

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