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 Provider
- func (c *Provider) ChannelProvider() fab.ChannelProvider
- func (c *Provider) Config() core.Config
- func (c *Provider) CryptoSuite() core.CryptoSuite
- func (c *Provider) DiscoveryProvider() fab.DiscoveryProvider
- func (c *Provider) IdentityManager(orgName string) (msp.IdentityManager, bool)
- func (c *Provider) InfraProvider() fab.InfraProvider
- func (c *Provider) SelectionProvider() fab.SelectionProvider
- func (c *Provider) SigningManager() core.SigningManager
- func (c *Provider) UserStore() msp.UserStore
- type ReqContextOptions
- type SDKContextParams
- func WithChannelProvider(channelProvider fab.ChannelProvider) SDKContextParams
- func WithConfig(config core.Config) SDKContextParams
- func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams
- func WithDiscoveryProvider(discoveryProvider fab.DiscoveryProvider) SDKContextParams
- func WithIdentityManagerProvider(provider msp.IdentityManagerProvider) SDKContextParams
- func WithInfraProvider(infraProvider fab.InfraProvider) SDKContextParams
- func WithSelectionProvider(selectionProvider fab.SelectionProvider) 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
func (*Channel) DiscoveryService ¶
func (c *Channel) DiscoveryService() fab.DiscoveryService
DiscoveryService returns core discovery service
func (*Channel) SelectionService ¶
func (c *Channel) SelectionService() fab.SelectionService
SelectionService returns selection service
type Client ¶
type Client struct { context.Providers msp.SigningIdentity }
Client supplies the configuration and signing identity to client objects.
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) DiscoveryProvider ¶
func (c *Provider) DiscoveryProvider() fab.DiscoveryProvider
DiscoveryProvider returns discovery provider
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) SelectionProvider ¶
func (c *Provider) SelectionProvider() fab.SelectionProvider
SelectionProvider returns selection 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 core.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 FabContext
func WithConfig ¶
func WithConfig(config core.Config) SDKContextParams
WithConfig sets config to FabContext
func WithCryptoSuite ¶
func WithCryptoSuite(cryptoSuite core.CryptoSuite) SDKContextParams
WithCryptoSuite sets cryptosuite parameter to FabContext
func WithDiscoveryProvider ¶
func WithDiscoveryProvider(discoveryProvider fab.DiscoveryProvider) SDKContextParams
WithDiscoveryProvider sets discoveryProvider to FabContext
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 FabContext
func WithSelectionProvider ¶
func WithSelectionProvider(selectionProvider fab.SelectionProvider) SDKContextParams
WithSelectionProvider sets selectionProvider to FabContext
func WithSigningManager ¶
func WithSigningManager(signingManager core.SigningManager) SDKContextParams
WithSigningManager sets signingManager to FabContext
func WithUserStore ¶
func WithUserStore(userStore msp.UserStore) SDKContextParams
WithUserStore sets user store to FabContext