Documentation ¶
Index ¶
- type CAConfig
- type CCType
- type ChannelConfig
- type ChannelPeer
- type ClientConfig
- type Config
- type CredentialStoreType
- type LoggingType
- type MutualTLSConfig
- type NetworkConfig
- type OrdererConfig
- type OrganizationConfig
- type PeerChannelConfig
- type PeerConfig
- type TLSConfig
- type TLSType
- type TimeoutType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAConfig ¶
type CAConfig struct { URL string HTTPOptions map[string]interface{} TLSCACerts MutualTLSConfig Registrar struct { EnrollID string EnrollSecret string } CAName string }
CAConfig defines a CA configuration
type ChannelConfig ¶
type ChannelConfig struct { // Orderers list of ordering service nodes Orderers []string // Peers a list of peer-channels that are part of this organization // to get the real Peer config object, use the Name field and fetch NetworkConfig.Peers[Name] Peers map[string]PeerChannelConfig // Chaincodes list of services Chaincodes []string }
ChannelConfig provides the definition of channels for the network
type ChannelPeer ¶
type ChannelPeer struct { PeerChannelConfig PeerConfig MspID string }
ChannelPeer combines channel peer info with raw peerConfig info
type ClientConfig ¶
type ClientConfig struct { Organization string Logging LoggingType CryptoConfig CCType TLS TLSType // currently not used by GO-SDK CredentialStore CredentialStoreType }
ClientConfig provides the definition of the client configuration
type Config ¶
type Config interface { Client() (*ClientConfig, error) CAConfig(org string) (*CAConfig, error) CAServerCertFiles(org string) ([]string, error) CAClientKeyFile(org string) (string, error) CAClientCertFile(org string) (string, error) TimeoutOrDefault(TimeoutType) time.Duration MspID(org string) (string, error) OrderersConfig() ([]OrdererConfig, error) RandomOrdererConfig() (*OrdererConfig, error) OrdererConfig(name string) (*OrdererConfig, error) PeersConfig(org string) ([]PeerConfig, error) PeerConfig(org string, name string) (*PeerConfig, error) NetworkConfig() (*NetworkConfig, error) ChannelConfig(name string) (*ChannelConfig, error) ChannelPeers(name string) ([]ChannelPeer, error) SetTLSCACertPool(*x509.CertPool) TLSCACertPool(tlsCertificate string) (*x509.CertPool, error) IsSecurityEnabled() bool SecurityAlgorithm() string SecurityLevel() int SecurityProvider() string Ephemeral() bool SoftVerify() bool SecurityProviderLibPath() string SecurityProviderPin() string SecurityProviderLabel() string KeyStorePath() string CAKeyStorePath() string CryptoConfigPath() string CSPConfig() *bccspFactory.FactoryOpts }
Config fabric-sdk-go configuration interface
type CredentialStoreType ¶
CredentialStoreType defines pluggable KV store properties
type LoggingType ¶
type LoggingType struct {
Level string
}
LoggingType defines the level of logging
type MutualTLSConfig ¶
type MutualTLSConfig struct { // Certfiles root certificates for TLS validation (Comma serparated path list) Path string // Client client TLS information Client struct { // Keyfile client key path Keyfile string // Certfile client cert path Certfile string } }
MutualTLSConfig Mutual TLS configurations
type NetworkConfig ¶
type NetworkConfig struct { Name string Xtype string Description string Version string Client ClientConfig Channels map[string]ChannelConfig Organizations map[string]OrganizationConfig Orderers map[string]OrdererConfig Peers map[string]PeerConfig CertificateAuthorities map[string]CAConfig }
NetworkConfig provides a static definition of a Hyperledger Fabric network
type OrdererConfig ¶
OrdererConfig defines an orderer configuration
type OrganizationConfig ¶
type OrganizationConfig struct { MspID string CryptoPath string Peers []string CertificateAuthorities []string AdminPrivateKey TLSConfig SignedCert TLSConfig }
OrganizationConfig provides the definition of an organization in the network
type PeerChannelConfig ¶
type PeerChannelConfig struct { EndorsingPeer bool ChaincodeQuery bool LedgerQuery bool EventSource bool }
PeerChannelConfig defines the peer capabilities
type PeerConfig ¶
type PeerConfig struct { URL string EventURL string GRPCOptions map[string]interface{} TLSCACerts TLSConfig }
PeerConfig defines a peer configuration
type TLSConfig ¶
type TLSConfig struct { // the following two fields are interchangeable. // If Path is available, then it will be used to load the cert // if Pem is available, then it has the raw data of the cert it will be used as-is // Certificate root certificate path Path string // Certificate actual content Pem string }
TLSConfig TLS configurations
type TimeoutType ¶
type TimeoutType int
TimeoutType enumerates the different types of outgoing connections
const ( // Endorser connection timeout Endorser TimeoutType = iota // EventHub connection timeout EventHub // EventReg connection timeout EventReg // Query timeout Query // ExecuteTx timeout ExecuteTx // OrdererConnection orderer connection timeout OrdererConnection // OrdererResponse orderer response timeout OrdererResponse )