context

package
v0.1.3-0...-617a0de Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 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 Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider supplies the framework configuration to client objects.

func New

func New(opts ...ProviderOption) (*Provider, error)

New instantiates a new context provider.

func (*Provider) AriesFrameworkID

func (p *Provider) AriesFrameworkID() string

AriesFrameworkID returns an inbound transport endpoint.

func (*Provider) Crypto

func (p *Provider) Crypto() crypto.Crypto

Crypto returns the Crypto service

func (*Provider) InboundMessageHandler

func (p *Provider) InboundMessageHandler() transport.InboundMessageHandler

InboundMessageHandler return an inbound message handler.

func (*Provider) KMS

func (p *Provider) KMS() kms.KeyManager

KMS returns a Key Management Service

func (*Provider) LegacyKMS

func (p *Provider) LegacyKMS() legacykms.KeyManager

LegacyKMS returns a legacyKMS service.

func (*Provider) Messenger

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

Messenger returns a messenger.

func (*Provider) OutboundDispatcher

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

OutboundDispatcher returns an outbound dispatcher.

func (*Provider) OutboundTransports

func (p *Provider) OutboundTransports() []transport.OutboundTransport

OutboundTransports returns an outbound transports.

func (*Provider) Packager

func (p *Provider) Packager() commontransport.Packager

Packager returns a packager service.

func (*Provider) Packers

func (p *Provider) Packers() []packer.Packer

Packers returns a list of enabled packers.

func (*Provider) PrimaryPacker

func (p *Provider) PrimaryPacker() packer.Packer

PrimaryPacker returns the main inbound/outbound Packer service.

func (*Provider) RouterEndpoint

func (p *Provider) RouterEndpoint() string

RouterEndpoint returns a router transport endpoint. The router gives this endpoint to the requester agent during route registration. The requester agent can use as it's service endpoint. The router checks the forward message to routes the message based on the recipient keys(if registered).

func (*Provider) SecretLock

func (p *Provider) SecretLock() secretlock.Service

SecretLock returns a secret lock service

func (*Provider) Service

func (p *Provider) Service(id string) (interface{}, error)

Service return protocol service

func (*Provider) ServiceEndpoint

func (p *Provider) ServiceEndpoint() string

ServiceEndpoint returns an service endpoint. This endpoint is used in DID Exchange Invitation or DID Document service to send messages to the agent.

func (*Provider) Signer

func (p *Provider) Signer() legacykms.Signer

Signer returns a legacyKMS signing service.

func (*Provider) StorageProvider

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

StorageProvider return a storage provider.

func (*Provider) TransientStorageProvider

func (p *Provider) TransientStorageProvider() storage.Provider

TransientStorageProvider return a transient storage provider.

func (*Provider) TransportReturnRoute

func (p *Provider) TransportReturnRoute() string

TransportReturnRoute returns transport return route

func (*Provider) VDRIRegistry

func (p *Provider) VDRIRegistry() vdriapi.Registry

VDRIRegistry returns a vdri registry

type ProviderOption

type ProviderOption func(opts *Provider) error

ProviderOption configures the framework.

func WithAriesFrameworkID

func WithAriesFrameworkID(id string) ProviderOption

WithAriesFrameworkID injects the framework ID into the context. This is used to tie different framework components. The client can have multiple framework and with same instance of transport shared across it and this id is used by the framework to tie the inbound transport and outbound transports (in case of duplex communication).

func WithCrypto

func WithCrypto(c crypto.Crypto) ProviderOption

WithCrypto injects a Crypto service into the context

func WithKMS

func WithKMS(k kms.KeyManager) ProviderOption

WithKMS injects a kms service into the context

func WithLegacyKMS

func WithLegacyKMS(w legacykms.KMS) ProviderOption

WithLegacyKMS injects a legacy KMS service into the context.

func WithMessageServiceProvider

func WithMessageServiceProvider(msv api.MessageServiceProvider) ProviderOption

WithMessageServiceProvider injects a message service provider into the context

func WithMessengerHandler

func WithMessengerHandler(mh service.MessengerHandler) ProviderOption

WithMessengerHandler injects the messenger into the context.

func WithOutboundDispatcher

func WithOutboundDispatcher(outboundDispatcher dispatcher.Outbound) ProviderOption

WithOutboundDispatcher injects an outbound dispatcher into the context.

func WithOutboundTransports

func WithOutboundTransports(transports ...transport.OutboundTransport) ProviderOption

WithOutboundTransports injects an outbound transports into the context.

func WithPackager

func WithPackager(p commontransport.Packager) ProviderOption

WithPackager injects a packager into the context.

func WithPacker

func WithPacker(primary packer.Packer, additionalPackers ...packer.Packer) ProviderOption

WithPacker injects at least one Packer into the context, with the primary Packer being used for inbound/outbound communication and the additional packers being available for unpacking inbound messages.

func WithProtocolServices

func WithProtocolServices(services ...dispatcher.ProtocolService) ProviderOption

WithProtocolServices injects a protocol services into the context.

func WithRouterEndpoint

func WithRouterEndpoint(endpoint string) ProviderOption

WithRouterEndpoint injects an router transport endpoint into the context.

func WithSecretLock

func WithSecretLock(s secretlock.Service) ProviderOption

WithSecretLock injects a secret lock service into the context

func WithServiceEndpoint

func WithServiceEndpoint(endpoint string) ProviderOption

WithServiceEndpoint injects an service transport endpoint into the context.

func WithStorageProvider

func WithStorageProvider(s storage.Provider) ProviderOption

WithStorageProvider injects a storage provider into the context.

func WithTransientStorageProvider

func WithTransientStorageProvider(s storage.Provider) ProviderOption

WithTransientStorageProvider injects a transient storage provider into the context.

func WithTransportReturnRoute

func WithTransportReturnRoute(transportReturnRoute string) ProviderOption

WithTransportReturnRoute injects transport return route option to the Aries framework.

func WithVDRIRegistry

func WithVDRIRegistry(vdri vdriapi.Registry) ProviderOption

WithVDRIRegistry injects a vdri service into the context.

Jump to

Keyboard shortcuts

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