Documentation ¶
Index ¶
- Variables
- func NewRequest(client context.Client, options ...ReqContextOptions) (reqContext.Context, reqContext.CancelFunc)
- func RequestClientContext(ctx reqContext.Context) (context.Client, bool)
- func RequestCommManager(ctx reqContext.Context) (fab.CommManager, bool)
- type Channel
- type Client
- type Local
- type Provider
- func (c *Provider) ChannelProvider() fab.ChannelProvider
- func (c *Provider) CryptoSuite() core.CryptoSuite
- func (c *Provider) EndpointConfig() fab.EndpointConfig
- func (c *Provider) IdentityConfig() msp.IdentityConfig
- func (c *Provider) IdentityManager(orgName string) (msp.IdentityManager, bool)
- func (c *Provider) InfraProvider() fab.InfraProvider
- func (c *Provider) LocalDiscoveryProvider() fab.LocalDiscoveryProvider
- func (c *Provider) SigningManager() core.SigningManager
- func (c *Provider) UserStore() msp.UserStore
- type ReqContextOptions
- type SDKContextParams
- func WithChannelProvider(channelProvider fab.ChannelProvider) SDKContextParams
- func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams
- func WithCryptoSuiteConfig(cryptoSuiteConfig core.CryptoSuiteConfig) SDKContextParams
- func WithEndpointConfig(endpointConfig fab.EndpointConfig) SDKContextParams
- func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams
- func WithIdentityManagerProvider(provider msp.IdentityManagerProvider) SDKContextParams
- func WithInfraProvider(infraProvider fab.InfraProvider) SDKContextParams
- func WithLocalDiscoveryProvider(discoveryProvider fab.LocalDiscoveryProvider) SDKContextParams
- func WithSigningManager(signingManager core.SigningManager) SDKContextParams
- func WithUserStore(userStore msp.UserStore) SDKContextParams
Constants ¶
This section is empty.
Variables ¶
var ReqContextTimeoutOverrides = reqContextKey("timeout-overrides")
ReqContextTimeoutOverrides key for grpc context value of timeout overrides
Functions ¶
func NewRequest ¶
func NewRequest(client context.Client, options ...ReqContextOptions) (reqContext.Context, reqContext.CancelFunc)
NewRequest creates a request-scoped context.
func RequestClientContext ¶
func RequestClientContext(ctx reqContext.Context) (context.Client, bool)
RequestClientContext extracts the Client Context from the request-scoped context.
func RequestCommManager ¶
func RequestCommManager(ctx reqContext.Context) (fab.CommManager, bool)
RequestCommManager extracts the CommManager from the request-scoped context.
Types ¶
type Channel ¶
Channel supplies the configuration for channel context client
func NewChannel ¶
func NewChannel(clientProvider context.ClientProvider, channelID string) (*Channel, error)
NewChannel creates new channel context client Not be used by end developers, fabsdk package use only
func (*Channel) ChannelService ¶
func (c *Channel) ChannelService() fab.ChannelService
ChannelService returns channel service
type Client ¶
type Client struct { context.Providers msp.SigningIdentity }
Client supplies the configuration and signing identity to client objects.
type Local ¶
Local supplies the configuration and signing identity to clients that will be invoking the peer outside of a channel context using an identity in the peer's local MSP.
func NewLocal ¶
func NewLocal(clientProvider context.ClientProvider) (*Local, error)
NewLocal returns a new local context
func (*Local) LocalDiscoveryService ¶
func (c *Local) LocalDiscoveryService() fab.DiscoveryService
LocalDiscoveryService returns core discovery service
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implementation of Providers interface
func NewProvider ¶
func NewProvider(params ...SDKContextParams) *Provider
NewProvider creates new context client provider Not be used by end developers, fabsdk package use only
func (*Provider) ChannelProvider ¶
func (c *Provider) ChannelProvider() fab.ChannelProvider
ChannelProvider provides channel services.
func (*Provider) CryptoSuite ¶
func (c *Provider) CryptoSuite() core.CryptoSuite
CryptoSuite returns the BCCSP provider of sdk.
func (*Provider) EndpointConfig ¶
func (c *Provider) EndpointConfig() fab.EndpointConfig
EndpointConfig returns end point network config
func (*Provider) IdentityConfig ¶
func (c *Provider) IdentityConfig() msp.IdentityConfig
IdentityConfig returns the Identity config
func (*Provider) IdentityManager ¶
func (c *Provider) IdentityManager(orgName string) (msp.IdentityManager, bool)
IdentityManager returns identity manager for organization
func (*Provider) InfraProvider ¶
func (c *Provider) InfraProvider() fab.InfraProvider
InfraProvider provides fabric objects such as peer and user
func (*Provider) LocalDiscoveryProvider ¶
func (c *Provider) LocalDiscoveryProvider() fab.LocalDiscoveryProvider
LocalDiscoveryProvider returns the local discovery provider
func (*Provider) SigningManager ¶
func (c *Provider) SigningManager() core.SigningManager
SigningManager returns signing manager
type ReqContextOptions ¶
type ReqContextOptions func(opts *requestContextOpts)
ReqContextOptions parameter for creating requestContext
func WithParent ¶
func WithParent(context reqContext.Context) ReqContextOptions
WithParent sets existing reqContext as a parent ReqContext
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ReqContextOptions
WithTimeout sets timeout time duration to request context
func WithTimeoutType ¶
func WithTimeoutType(timeoutType fab.TimeoutType) ReqContextOptions
WithTimeoutType sets timeout by type defined in config to request context
type SDKContextParams ¶
type SDKContextParams func(opts *Provider)
SDKContextParams parameter for creating FabContext
func WithChannelProvider ¶
func WithChannelProvider(channelProvider fab.ChannelProvider) SDKContextParams
WithChannelProvider sets channelProvider to Context Provider
func WithCryptoSuite ¶
func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams
WithCryptoSuite sets cryptosuite parameter to Context Provider
func WithCryptoSuiteConfig ¶
func WithCryptoSuiteConfig(cryptoSuiteConfig core.CryptoSuiteConfig) SDKContextParams
WithCryptoSuiteConfig sets core cryptoSuite config to Context Provider
func WithEndpointConfig ¶
func WithEndpointConfig(endpointConfig fab.EndpointConfig) SDKContextParams
WithEndpointConfig sets fab endpoint network config to Context Provider
func WithIdentityConfig ¶
func WithIdentityConfig(identityConfig msp.IdentityConfig) SDKContextParams
WithIdentityConfig sets msp identity config to Context Provider
func WithIdentityManagerProvider ¶
func WithIdentityManagerProvider(provider msp.IdentityManagerProvider) SDKContextParams
WithIdentityManagerProvider sets IdentityManagerProvider maps to context
func WithInfraProvider ¶
func WithInfraProvider(infraProvider fab.InfraProvider) SDKContextParams
WithInfraProvider sets infraProvider maps to Context Provider
func WithLocalDiscoveryProvider ¶
func WithLocalDiscoveryProvider(discoveryProvider fab.LocalDiscoveryProvider) SDKContextParams
WithLocalDiscoveryProvider sets the local discovery provider
func WithSigningManager ¶
func WithSigningManager(signingManager core.SigningManager) SDKContextParams
WithSigningManager sets signingManager to Context Provider
func WithUserStore ¶
func WithUserStore(userStore msp.UserStore) SDKContextParams
WithUserStore sets user store to Context Provider