Documentation ¶
Index ¶
- type Config
- func (c *Config) CAClientCertFile(org string) (string, error)
- func (c *Config) CAClientKeyFile(org string) (string, error)
- func (c *Config) CAConfig(org string) (*apiconfig.CAConfig, error)
- func (c *Config) CAKeyStorePath() string
- func (c *Config) CAServerCertFiles(org string) ([]string, error)
- func (c *Config) CSPConfig() *bccspFactory.FactoryOpts
- func (c *Config) ChannelConfig(name string) (*apiconfig.ChannelConfig, error)
- func (c *Config) ChannelPeers(name string) ([]apiconfig.ChannelPeer, error)
- func (c *Config) Client() (*apiconfig.ClientConfig, error)
- func (c *Config) CryptoConfigPath() string
- func (c *Config) Ephemeral() bool
- func (c *Config) IsSecurityEnabled() bool
- func (c *Config) KeyStorePath() string
- func (c *Config) MspID(org string) (string, error)
- func (c *Config) NetworkConfig() (*apiconfig.NetworkConfig, error)
- func (c *Config) OrdererConfig(name string) (*apiconfig.OrdererConfig, error)
- func (c *Config) OrderersConfig() ([]apiconfig.OrdererConfig, error)
- func (c *Config) PeerConfig(org string, name string) (*apiconfig.PeerConfig, error)
- func (c *Config) PeersConfig(org string) ([]apiconfig.PeerConfig, error)
- func (c *Config) RandomOrdererConfig() (*apiconfig.OrdererConfig, error)
- func (c *Config) SecurityAlgorithm() string
- func (c *Config) SecurityLevel() int
- func (c *Config) SecurityProvider() string
- func (c *Config) SecurityProviderLabel() string
- func (c *Config) SecurityProviderLibPath() string
- func (c *Config) SecurityProviderPin() string
- func (c *Config) SetTLSCACertPool(certPool *x509.CertPool)
- func (c *Config) SoftVerify() bool
- func (c *Config) TLSCACertPool(tlsCertificate string) (*x509.CertPool, error)
- func (c *Config) TimeoutOrDefault(conn apiconfig.TimeoutType) time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents the configuration for the client
func InitConfig ¶
InitConfig ... initConfig reads in config file
func InitConfigWithCmdRoot ¶
InitConfigWithCmdRoot reads in a config file and allows the environment variable prefixed to be specified
func (*Config) CAClientCertFile ¶
CAClientCertFile Read configuration option for the fabric CA client cert file
func (*Config) CAClientKeyFile ¶
CAClientKeyFile Read configuration option for the fabric CA client key file
func (*Config) CAKeyStorePath ¶
CAKeyStorePath returns the same path as KeyStorePath() without the 'keystore' directory added. This is done because the fabric-ca-client adds this to the path
func (*Config) CAServerCertFiles ¶
CAServerCertFiles Read configuration option for the server certificate files
func (*Config) ChannelConfig ¶
func (c *Config) ChannelConfig(name string) (*apiconfig.ChannelConfig, error)
ChannelConfig returns the channel configuration
func (*Config) ChannelPeers ¶
func (c *Config) ChannelPeers(name string) ([]apiconfig.ChannelPeer, error)
ChannelPeers returns the channel peers configuration
func (*Config) Client ¶
func (c *Config) Client() (*apiconfig.ClientConfig, error)
Client returns the Client config
func (*Config) KeyStorePath ¶
KeyStorePath returns the keystore path used by BCCSP
func (*Config) NetworkConfig ¶
func (c *Config) NetworkConfig() (*apiconfig.NetworkConfig, error)
NetworkConfig returns the network configuration defined in the config file
func (*Config) OrdererConfig ¶
func (c *Config) OrdererConfig(name string) (*apiconfig.OrdererConfig, error)
OrdererConfig returns the requested orderer
func (*Config) OrderersConfig ¶
func (c *Config) OrderersConfig() ([]apiconfig.OrdererConfig, error)
OrderersConfig returns a list of defined orderers
func (*Config) PeerConfig ¶
PeerConfig Retrieves a specific peer from the configuration by org and name
func (*Config) PeersConfig ¶
func (c *Config) PeersConfig(org string) ([]apiconfig.PeerConfig, error)
PeersConfig Retrieves the fabric peers for the specified org from the config file provided
func (*Config) RandomOrdererConfig ¶
func (c *Config) RandomOrdererConfig() (*apiconfig.OrdererConfig, error)
RandomOrdererConfig returns a pseudo-random orderer from the network config
func (*Config) SecurityAlgorithm ¶
SecurityAlgorithm ...
func (*Config) SecurityProvider ¶
SecurityProvider provider SW or PKCS11
func (*Config) SecurityProviderLabel ¶
SecurityProviderLabel will be set only if provider is PKCS11
func (*Config) SecurityProviderLibPath ¶
SecurityProviderLibPath will be set only if provider is PKCS11
func (*Config) SecurityProviderPin ¶
SecurityProviderPin will be set only if provider is PKCS11
func (*Config) SetTLSCACertPool ¶
SetTLSCACertPool allows a user to set a global cert pool with a set of root TLS CAs that will be used for all outgoing connections
func (*Config) TLSCACertPool ¶
TLSCACertPool returns the configured cert pool. If a tlsCertificate path is provided, the certficate is added to the pool
func (*Config) TimeoutOrDefault ¶
func (c *Config) TimeoutOrDefault(conn apiconfig.TimeoutType) time.Duration
TimeoutOrDefault reads connection timeouts for the given connection type