config

package
v0.0.0-...-e171dc0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

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

func InitConfig(configFile string) (*Config, error)

InitConfig ... initConfig reads in config file

func InitConfigWithCmdRoot

func InitConfigWithCmdRoot(configFile string, cmdRootPrefix string) (*Config, error)

InitConfigWithCmdRoot reads in a config file and allows the environment variable prefixed to be specified

func (*Config) CAClientCertFile

func (c *Config) CAClientCertFile(org string) (string, error)

CAClientCertFile Read configuration option for the fabric CA client cert file

func (*Config) CAClientKeyFile

func (c *Config) CAClientKeyFile(org string) (string, error)

CAClientKeyFile Read configuration option for the fabric CA client key file

func (*Config) CAConfig

func (c *Config) CAConfig(org string) (*apiconfig.CAConfig, error)

CAConfig returns the CA configuration.

func (*Config) CAKeyStorePath

func (c *Config) CAKeyStorePath() string

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

func (c *Config) CAServerCertFiles(org string) ([]string, error)

CAServerCertFiles Read configuration option for the server certificate files

func (*Config) CSPConfig

func (c *Config) CSPConfig() *bccspFactory.FactoryOpts

CSPConfig ...

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) CryptoConfigPath

func (c *Config) CryptoConfigPath() string

CryptoConfigPath ...

func (*Config) Ephemeral

func (c *Config) Ephemeral() bool

Ephemeral flag

func (*Config) IsSecurityEnabled

func (c *Config) IsSecurityEnabled() bool

IsSecurityEnabled ...

func (*Config) KeyStorePath

func (c *Config) KeyStorePath() string

KeyStorePath returns the keystore path used by BCCSP

func (*Config) MspID

func (c *Config) MspID(org string) (string, error)

MspID returns the MSP ID for the requested organization

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

func (c *Config) PeerConfig(org string, name string) (*apiconfig.PeerConfig, error)

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

func (c *Config) SecurityAlgorithm() string

SecurityAlgorithm ...

func (*Config) SecurityLevel

func (c *Config) SecurityLevel() int

SecurityLevel ...

func (*Config) SecurityProvider

func (c *Config) SecurityProvider() string

SecurityProvider provider SW or PKCS11

func (*Config) SecurityProviderLabel

func (c *Config) SecurityProviderLabel() string

SecurityProviderLabel will be set only if provider is PKCS11

func (*Config) SecurityProviderLibPath

func (c *Config) SecurityProviderLibPath() string

SecurityProviderLibPath will be set only if provider is PKCS11

func (*Config) SecurityProviderPin

func (c *Config) SecurityProviderPin() string

SecurityProviderPin will be set only if provider is PKCS11

func (*Config) SetTLSCACertPool

func (c *Config) SetTLSCACertPool(certPool *x509.CertPool)

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) SoftVerify

func (c *Config) SoftVerify() bool

SoftVerify flag

func (*Config) TLSCACertPool

func (c *Config) TLSCACertPool(tlsCertificate string) (*x509.CertPool, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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