Documentation ¶
Index ¶
- type AnchorPeer
- type Application
- type ApplicationCapabilities
- type Capabilities
- type Channel
- type ChannelArtifacts
- type ChannelCapabilities
- type ConfigBuilder
- type Configtx
- type ConnectConfig
- type Consortiums
- type CryptoConfig
- type FabricConfig
- func (f FabricConfig) BuildCryptoFile()
- func (f FabricConfig) BuildTxFile()
- func (f FabricConfig) SetApplication() FabricConfig
- func (f FabricConfig) SetCapabilities() FabricConfig
- func (f FabricConfig) SetChannel() FabricConfig
- func (f FabricConfig) SetOrderer() FabricConfig
- func (f FabricConfig) SetOrdererOrgs() FabricConfig
- func (f FabricConfig) SetOrganizations() FabricConfig
- func (f FabricConfig) SetPeerOrgs() FabricConfig
- func (f FabricConfig) SetProfiles() FabricConfig
- type FabricK8s
- type OcApplication
- type OgOrderer
- type Orderer
- type OrdererCapabilities
- type OrdererGenesis
- type OrdererOrg
- type OrdererPolicies
- type Organization
- type OrgsChannel
- type PeerOrg
- type Policies
- type Profiles
- type ProjectDir
- type TypeRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnchorPeer ¶
type Application ¶
type Application struct { Organizations string `yaml:"Organizations"` Policies Policies `yaml:"Policies"` Capabilities ApplicationCapabilities `yaml:"Capabilities"` }
type ApplicationCapabilities ¶
type Capabilities ¶
type Capabilities struct { Channel ChannelCapabilities `yaml:"Channel"` Orderer OrdererCapabilities `yaml:"Orderer"` Application ApplicationCapabilities `yaml:"Application"` }
type Channel ¶
type Channel struct { Policies Policies `yaml:"Policies"` Capabilities ChannelCapabilities `yaml:"Capabilities"` }
type ChannelArtifacts ¶
type ChannelArtifacts struct {
// contains filtered or unexported fields
}
func NewChannelArtifacts ¶
func NewChannelArtifacts(chain models.FabricChain, rootPath string) *ChannelArtifacts
func (*ChannelArtifacts) GenerateAnchorPeers ¶
func (c *ChannelArtifacts) GenerateAnchorPeers()
func (*ChannelArtifacts) GenerateCerts ¶
func (c *ChannelArtifacts) GenerateCerts()
func (*ChannelArtifacts) GenerateOrdererGenesis ¶
func (c *ChannelArtifacts) GenerateOrdererGenesis()
func (*ChannelArtifacts) GenerateOrgsChannel ¶
func (c *ChannelArtifacts) GenerateOrgsChannel()
type ChannelCapabilities ¶
type ChannelCapabilities struct {
V1_3 bool `yaml:"V1_3"`
}
type ConfigBuilder ¶
type ConfigBuilder interface { //configtx.yaml SetOrganizations() FabricConfig SetCapabilities() FabricConfig SetApplication() FabricConfig SetOrderer() FabricConfig SetChannel() FabricConfig SetProfiles() FabricConfig BuildTxFile() //crypto-config.yaml SetOrdererOrgs() FabricConfig SetPeerOrgs() FabricConfig BuildCryptoFile() }
func NewConfigBuilder ¶
func NewConfigBuilder(chain models.FabricChain, rootPath string) ConfigBuilder
type Configtx ¶
type Configtx struct { Organizations []Organization `yaml:"-"` Capabilities Capabilities `yaml:"-"` Application Application `yaml:"-"` Orderer Orderer `yaml:"-"` Channel Channel `yaml:"-"` Profiles Profiles `yaml:"Profiles"` }
type ConnectConfig ¶
type ConnectConfig struct { models.FabricChain // contains filtered or unexported fields }
func NewConnectConfig ¶
func NewConnectConfig(chain models.FabricChain, rootPath string) *ConnectConfig
func (*ConnectConfig) Build ¶
func (c *ConnectConfig) Build() []byte
func (*ConnectConfig) GetBytes ¶
func (c *ConnectConfig) GetBytes(maps map[string]interface{}) []byte
type Consortiums ¶
type Consortiums struct { SampleConsortium struct { Organizations []Organization `yaml:"Organizations"` } `yaml:"SampleConsortium"` }
type CryptoConfig ¶
type CryptoConfig struct { OrdererOrgs []OrdererOrg `yaml:"OrdererOrgs"` PeerOrgs []PeerOrg `yaml:"PeerOrgs"` }
crypto-config.yaml
type FabricConfig ¶
type FabricConfig struct { models.FabricChain CryptoConfigDir string ConfigtxFile string CryptoConfigFile string //共识配置 OrdererBatchTimeout string //2s OrdererMaxMessageCount int //500 OrdererAbsoluteMaxBytes string //99 MB OrdererPreferredMaxBytes string //512 KB // contains filtered or unexported fields }
fabric 配置
func (FabricConfig) BuildCryptoFile ¶
func (f FabricConfig) BuildCryptoFile()
func (FabricConfig) BuildTxFile ¶
func (f FabricConfig) BuildTxFile()
func (FabricConfig) SetApplication ¶
func (f FabricConfig) SetApplication() FabricConfig
func (FabricConfig) SetCapabilities ¶
func (f FabricConfig) SetCapabilities() FabricConfig
func (FabricConfig) SetChannel ¶
func (f FabricConfig) SetChannel() FabricConfig
func (FabricConfig) SetOrderer ¶
func (f FabricConfig) SetOrderer() FabricConfig
func (FabricConfig) SetOrdererOrgs ¶
func (f FabricConfig) SetOrdererOrgs() FabricConfig
func (FabricConfig) SetOrganizations ¶
func (f FabricConfig) SetOrganizations() FabricConfig
func (FabricConfig) SetPeerOrgs ¶
func (f FabricConfig) SetPeerOrgs() FabricConfig
func (FabricConfig) SetProfiles ¶
func (f FabricConfig) SetProfiles() FabricConfig
type FabricK8s ¶
type FabricK8s struct {
// contains filtered or unexported fields
}
func NewFabricK8s ¶
func NewFabricK8s(chain models.FabricChain, conf config.UserBaasConfig) FabricK8s
type OcApplication ¶
type OcApplication struct { Policies Policies `yaml:"Policies"` Organizations []Organization `yaml:"Organizations"` Capabilities ApplicationCapabilities `yaml:"Capabilities"` }
type OgOrderer ¶
type OgOrderer struct { OrdererType string `yaml:"OrdererType"` Addresses []string `yaml:"Addresses"` BatchTimeout string `yaml:"BatchTimeout"` BatchSize struct { MaxMessageCount int `yaml:"MaxMessageCount"` AbsoluteMaxBytes string `yaml:"AbsoluteMaxBytes"` PreferredMaxBytes string `yaml:"PreferredMaxBytes"` } `yaml:"BatchSize"` Kafka struct { Brokers []string `yaml:"Brokers"` } `yaml:"Kafka"` Policies OrdererPolicies `yaml:"Policies"` Organizations []Organization `yaml:"Organizations"` Capabilities OrdererCapabilities `yaml:"Capabilities"` }
type Orderer ¶
type Orderer struct { OrdererType string `yaml:"OrdererType"` Addresses []string `yaml:"Addresses"` BatchTimeout string `yaml:"BatchTimeout"` BatchSize struct { MaxMessageCount int `yaml:"MaxMessageCount"` AbsoluteMaxBytes string `yaml:"AbsoluteMaxBytes"` PreferredMaxBytes string `yaml:"PreferredMaxBytes"` } `yaml:"BatchSize"` Kafka struct { Brokers []string `yaml:"Brokers"` } `yaml:"Kafka"` Organizations string `yaml:"Organizations"` Policies OrdererPolicies `yaml:"Policies"` }
type OrdererCapabilities ¶
type OrdererCapabilities struct {
V1_1 bool `yaml:"V1_1"`
}
type OrdererGenesis ¶
type OrdererGenesis struct { Policies Policies `yaml:"Policies"` Capabilities ChannelCapabilities `yaml:"Capabilities"` Orderer OgOrderer `yaml:"Orderer"` Consortiums Consortiums `yaml:"Consortiums"` }
type OrdererOrg ¶
type OrdererOrg struct { Name string `yaml:"Name"` Domain string `yaml:"Domain"` CA struct { Country string `yaml:"Country"` Province string `yaml:"Province"` Locality string `yaml:"Locality"` } `yaml:"CA"` Template struct { Count int `yaml:"Count"` } `yaml:"Template"` }
func NewOrdererOrg ¶
func NewOrdererOrg(domain string, ordererCount int) OrdererOrg
type OrdererPolicies ¶
type Organization ¶
type Organization struct { Name string `yaml:"Name"` ID string `yaml:"ID"` MSPDir string `yaml:"MSPDir"` Policies Policies `yaml:"Policies"` AnchorPeers []AnchorPeer `yaml:"AnchorPeers"` }
type OrgsChannel ¶
type OrgsChannel struct { Consortium string `yaml:"Consortium"` Application OcApplication `yaml:"Application"` }
type PeerOrg ¶
type PeerOrg struct { Name string `yaml:"Name"` Domain string `yaml:"Domain"` CA struct { Country string `yaml:"Country"` Province string `yaml:"Province"` Locality string `yaml:"Locality"` } `yaml:"CA"` Template struct { Count int `yaml:"Count"` } `yaml:"Template"` Users struct { Count int `yaml:"Count"` } `yaml:"Users"` EnableNodeOUs bool `yaml:"EnableNodeOUs"` }
func NewPeerOrg ¶
type Profiles ¶
type Profiles struct { OrdererGenesis OrdererGenesis `yaml:"OrdererGenesis"` OrgsChannel OrgsChannel `yaml:"OrgsChannel"` }
type ProjectDir ¶
type ProjectDir struct { }
func NewProjetc ¶
func NewProjetc() ProjectDir
func (ProjectDir) BuildProjectDir ¶
func (p ProjectDir) BuildProjectDir(chain models.FabricChain) config.UserBaasConfig
func (ProjectDir) RemoveProjectDir ¶
func (p ProjectDir) RemoveProjectDir(chain models.FabricChain) error
Click to show internal directories.
Click to hide internal directories.