api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ChannelMgmt() (chmgmt.ChannelMgmtClient, error)
	ResourceMgmt() (resmgmt.ResourceMgmtClient, error)
	Channel(id string) (chclient.ChannelClient, error)
}

Client represents the Client APIs supported by the SDK

type CoreProviderFactory

type CoreProviderFactory interface {
	NewStateStoreProvider(config apiconfig.Config) (kvstore.KVStore, error)
	NewCryptoSuiteProvider(config apiconfig.Config) (apicryptosuite.CryptoSuite, error)
	NewSigningManager(cryptoProvider apicryptosuite.CryptoSuite, config apiconfig.Config) (fab.SigningManager, error)
	NewFabricProvider(context fab.ProviderContext) (FabricProvider, error)
}

CoreProviderFactory allows overriding of primitives and the fabric core object provider

type CoreProviders

type CoreProviders interface {
	CryptoSuite() apicryptosuite.CryptoSuite
	StateStore() kvstore.KVStore
	Config() apiconfig.Config
	SigningManager() fab.SigningManager
	FabricProvider() FabricProvider
}

CoreProviders represents the SDK configured core providers context.

type FabricProvider

type FabricProvider interface {
	CreateChannelClient(user apifabclient.IdentityContext, cfg apifabclient.ChannelCfg) (apifabclient.Channel, error)
	CreateChannelLedger(ic apifabclient.IdentityContext, name string) (apifabclient.ChannelLedger, error)
	CreateChannelConfig(user apifabclient.IdentityContext, name string) (apifabclient.ChannelConfig, error)
	CreateResourceClient(user apifabclient.IdentityContext) (apifabclient.Resource, error)
	CreateEventHub(ic apifabclient.IdentityContext, name string) (apifabclient.EventHub, error)
	CreateCAClient(orgID string) (apifabca.FabricCAClient, error)

	CreatePeerFromConfig(peerCfg *apiconfig.NetworkPeer) (apifabclient.Peer, error)
	CreateOrdererFromConfig(cfg *apiconfig.OrdererConfig) (apifabclient.Orderer, error)
	CreateUser(name string, signingIdentity *apifabclient.SigningIdentity) (apifabclient.User, error)
}

FabricProvider enables access to fabric objects such as peer and user based on config or context.

type OrgClientFactory

type OrgClientFactory interface {
	//NewMSPClient(orgName string, config apiconfig.Config, cryptoProvider apicryptosuite.CryptoSuite) (fabca.FabricCAClient, error)
	NewCredentialManager(orgName string, config apiconfig.Config, cryptoProvider apicryptosuite.CryptoSuite) (fab.CredentialManager, error)
}

OrgClientFactory allows overriding default clients and providers of an organization Currently, a context is created for each organization that the client app needs.

type PkgSuite

type PkgSuite interface {
	Core() (CoreProviderFactory, error)
	Service() (ServiceProviderFactory, error)
	Context() (OrgClientFactory, error)
	Session() (SessionClientFactory, error)
	Logger() (apilogging.LoggerProvider, error)
}

PkgSuite provides the package factories that create clients and providers

type Providers

type Providers interface {
	CoreProviders
	SvcProviders
}

Providers represents the SDK configured providers context.

type ServiceProviderFactory

type ServiceProviderFactory interface {
	NewDiscoveryProvider(config apiconfig.Config) (fab.DiscoveryProvider, error)
	NewSelectionProvider(config apiconfig.Config) (fab.SelectionProvider, error)
}

ServiceProviderFactory allows overriding default service providers (such as peer discovery)

type SessionClientFactory

type SessionClientFactory interface {
	NewChannelMgmtClient(sdk Providers, session SessionContext) (chmgmt.ChannelMgmtClient, error)
	NewResourceMgmtClient(sdk Providers, session SessionContext, filter resmgmt.TargetFilter) (resmgmt.ResourceMgmtClient, error)
	NewChannelClient(sdk Providers, session SessionContext, channelID string, targetFilter fab.TargetFilter) (chclient.ChannelClient, error)
}

SessionClientFactory allows overriding default clients and providers of a session

type SessionContext

type SessionContext interface {
	apifabclient.IdentityContext
}

SessionContext primarily represents the session and identity context

type SvcProviders

type SvcProviders interface {
	DiscoveryProvider() fab.DiscoveryProvider
	SelectionProvider() fab.SelectionProvider
	ChannelProvider() fab.ChannelProvider
}

SvcProviders represents the SDK configured service providers context.

Directories

Path Synopsis
Package mock_api is a generated GoMock package.
Package mock_api is a generated GoMock package.

Jump to

Keyboard shortcuts

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