Documentation
¶
Index ¶
- func AppendChannelIntoSystemChannel(configtx *ConfigTx, channelName string, organizations []*Organization)
- type Application
- type ApplicationPolicies
- type ApplicationPoliciesRole
- type Capabilities
- type CapabilitiesV2
- type Channel
- type ChannelPolicies
- type ChannelPoliciesRole
- type ConfigTx
- func (that *ConfigTx) AddChannel(name string, consortium string)
- func (that *ConfigTx) AddOrdererToOrg(org *Organization, peerName string, orgName string, domainRoot string, ...)
- func (that *ConfigTx) AddOrganization(org *Organization)
- func (that *ConfigTx) CreateOrganization(orgName string, mspPath string) *Organization
- func (that *ConfigTx) Export(folder string)
- func (that *ConfigTx) FindOrganization(orgName string) *Organization
- type OrdererBatchSize
- type OrdererEtcd
- func (that *OrdererEtcd) AddConsenter(peerName string, orgName string, domainRoot string, port uint, ...)
- func (that *OrdererEtcd) AddOrderer(peerName string, orgName string, domainRoot string, port uint)
- func (that *OrdererEtcd) AddOrdererAndConsenter(peerName string, orgName string, domainRoot string, port uint, ...)
- type OrdererEtcdRaft
- type OrdererEtcdRaftConsenters
- type OrdererPolicies
- type OrdererPoliciesRole
- type Organization
- type OrganizationAnchorPeer
- type OrganizationPolicies
- type OrganizationsPoliciesRole
- type ProfilesChannelApplication
- type ProfilesChannelEtcd
- type ProfilesChannelOrdererEtcd
- type SystemChannelConsortium
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendChannelIntoSystemChannel ¶
func AppendChannelIntoSystemChannel(configtx *ConfigTx, channelName string, organizations []*Organization)
Types ¶
type Application ¶
type Application struct { // Organizations interface{} `yaml:"Organizations"` Polices *ApplicationPolicies `yaml:"Polices"` Capabilities *Capabilities `yaml:"Capabilities"` }
func GenerateDefaultApplication ¶
func GenerateDefaultApplication(capabilities *Capabilities) *Application
type ApplicationPolicies ¶
type ApplicationPolicies struct { Readers *ApplicationPoliciesRole `yaml:"Reader"` Writers *ApplicationPoliciesRole `yaml:"Writers"` Admins *ApplicationPoliciesRole `yaml:"Admins"` LifecycleEndorsement *ApplicationPoliciesRole `yaml:"LifecycleEndorsement"` Endorsement *ApplicationPoliciesRole `yaml:"Endorsement"` }
func GenerateDefaultApplicationPolicies ¶
func GenerateDefaultApplicationPolicies() *ApplicationPolicies
type ApplicationPoliciesRole ¶
type Capabilities ¶
type Capabilities struct { Channel *CapabilitiesV2 `yaml:"Channel"` Orderer *CapabilitiesV2 `yaml:"Orderer"` Application *CapabilitiesV2 `yaml:"Application"` }
func GenerateDefaultCapabilities ¶
func GenerateDefaultCapabilities() *Capabilities
type CapabilitiesV2 ¶
type CapabilitiesV2 struct {
V2_0 bool `yaml:"V2_0"`
}
type Channel ¶
type Channel struct { Policies *ChannelPolicies `yaml:"Policies"` Capabilities *Capabilities `yaml:"Capabilities"` }
func GenerateDefaultChannel ¶
func GenerateDefaultChannel(capabilities *Capabilities) *Channel
type ChannelPolicies ¶
type ChannelPolicies struct { Readers *ChannelPoliciesRole `yaml:"Readers"` Writers *ChannelPoliciesRole `yaml:"Writers"` Admins *ChannelPoliciesRole `yaml:"Admins"` }
func GenerateDefaultChannelPolicies ¶
func GenerateDefaultChannelPolicies() *ChannelPolicies
type ChannelPoliciesRole ¶
type ConfigTx ¶
type ConfigTx struct { // Organizations []map[string]Organizations `yaml:"Organizations"` Organizations []*Organization `yaml:"Organizations"` Capabilities *Capabilities `yaml:"Capabilities"` Application *Application `yaml:"Application"` Orderer *OrdererEtcd `yaml:"Orderer"` Channel *Channel `yaml:"Channel"` Profiles map[string]*ProfilesChannelEtcd `yaml:"Profiles"` }
func GenerateConfigTx ¶
func GenerateConfigTx() *ConfigTx
func (*ConfigTx) AddChannel ¶
func (*ConfigTx) AddOrdererToOrg ¶
func (*ConfigTx) AddOrganization ¶
func (that *ConfigTx) AddOrganization(org *Organization)
func (*ConfigTx) CreateOrganization ¶
func (that *ConfigTx) CreateOrganization(orgName string, mspPath string) *Organization
func (*ConfigTx) FindOrganization ¶
func (that *ConfigTx) FindOrganization(orgName string) *Organization
type OrdererBatchSize ¶
type OrdererBatchSize struct { MaxMessageCount uint `yaml:"MaxMessageCount"` AbsoluteMaxBytes string `yaml:"AbsoluteMaxBytes"` PreferredMaxBytes string `yaml:"PreferredMaxBytes"` }
func GenerateDefaultOrdererBatchSize ¶
func GenerateDefaultOrdererBatchSize() *OrdererBatchSize
type OrdererEtcd ¶
type OrdererEtcd struct { OrdererType string `yaml:"OrdererType"` Addresses []string `yaml:"Addresses"` EtcdRaft *OrdererEtcdRaft `yaml:"EtcdRaft"` BatchTimeout string `yaml:"BatchTimeout"` BatchSize *OrdererBatchSize `yaml:"BatchSize"` Policies *OrdererPolicies `yaml:"Policies"` Capabilities *Capabilities `yaml:"Capabilities"` }
func GenerateDefaultOrdererEtcd ¶
func GenerateDefaultOrdererEtcd(capabilities *Capabilities) *OrdererEtcd
func (*OrdererEtcd) AddConsenter ¶
func (*OrdererEtcd) AddOrderer ¶
func (that *OrdererEtcd) AddOrderer(peerName string, orgName string, domainRoot string, port uint)
func (*OrdererEtcd) AddOrdererAndConsenter ¶
type OrdererEtcdRaft ¶
type OrdererEtcdRaft struct {
Consenters []*OrdererEtcdRaftConsenters `yaml:"Consenters"`
}
type OrdererPolicies ¶
type OrdererPolicies struct { Readers *OrdererPoliciesRole `yaml:"Readers"` Writers *OrdererPoliciesRole `yaml:"Writers"` Admins *OrdererPoliciesRole `yaml:"Admins"` BlockValidation *OrdererPoliciesRole `yaml:"BlockValidation"` }
func GenerateDefaultOrdererPolicies ¶
func GenerateDefaultOrdererPolicies() *OrdererPolicies
type OrdererPoliciesRole ¶
type Organization ¶
type Organization struct { Name string `yaml:"Name"` // 组织名称 ID string `yaml:"ID"` // 组织ID MSPDir string `yaml:"MSPDir"` // 组织MSP文件夹路径 Policies *OrganizationPolicies `yaml:"Policies"` // 组织策略 OrdererEndpoints []string `yaml:"OrdererEndpoints"` // 排序节点列表 AnchorPeers []*OrganizationAnchorPeer `yaml:"AnchorPeers"` // 锚节点 对外代表本组织通信 }
func GenerateEmptyOrganization ¶
func GenerateEmptyOrganization(orgName string, msp string) *Organization
func (*Organization) AddAnchorPeer ¶
func (that *Organization) AddAnchorPeer(peerName string, orgName string, domainRoot string, port uint)
func (*Organization) AddOrderer ¶
func (that *Organization) AddOrderer(peerName string, orgName string, domainRoot string, port uint)
func (*Organization) SetPolicies ¶
func (that *Organization) SetPolicies(policies *OrganizationPolicies)
type OrganizationAnchorPeer ¶
type OrganizationPolicies ¶
type OrganizationPolicies struct { Readers *OrganizationsPoliciesRole `yaml:"Readers"` Writers *OrganizationsPoliciesRole `yaml:"Writers"` Admins *OrganizationsPoliciesRole `yaml:"Admins"` }
func GenerateDefaultPolicies ¶
func GenerateDefaultPolicies(orgName string) *OrganizationPolicies
type ProfilesChannelApplication ¶
type ProfilesChannelApplication struct { Application *Application `yaml:"Application"` Organizations []*Organization `yaml:"Organizations"` Capabilities *Capabilities `yaml:"Capabilities"` }
func GenerateDefaultProfilesChannelApplication ¶
func GenerateDefaultProfilesChannelApplication(application *Application, orgs []*Organization, capabilities *Capabilities) *ProfilesChannelApplication
type ProfilesChannelEtcd ¶
type ProfilesChannelEtcd struct { Consortium string `yaml:"Consortium"` Consortiums map[string]*SystemChannelConsortium `yaml:"Consortiums"` Channel *Channel `yaml:"Channel"` Orderer *ProfilesChannelOrdererEtcd `yaml:"Orderer"` Application *ProfilesChannelApplication `yaml:"Application"` }
func GenerateDefaultProfilesChannelWithEtcdOrderer ¶
func GenerateDefaultProfilesChannelWithEtcdOrderer(consortium string, channel *Channel, orderer *OrdererEtcd, ordererOrgs []*Organization, ordererCapabilities *Capabilities, application *Application, applicationOrgs []*Organization, applicationCapabilities *Capabilities, ) *ProfilesChannelEtcd
func GenerateSystemProfilesChannelWithEtcdOrderer ¶
func GenerateSystemProfilesChannelWithEtcdOrderer(channel *Channel, orderer *OrdererEtcd, ordererOrgs []*Organization, ordererCapabilities *Capabilities, application *Application, applicationOrgs []*Organization, applicationCapabilities *Capabilities, ) *ProfilesChannelEtcd
type ProfilesChannelOrdererEtcd ¶
type ProfilesChannelOrdererEtcd struct { Orderer *OrdererEtcd `yaml:"Orderer"` Organizations []*Organization `yaml:"Organizations"` Capabilities *Capabilities `yaml:"Capabilities"` }
func GenerateDefaultProfilesChannelOrdererEtcd ¶
func GenerateDefaultProfilesChannelOrdererEtcd(orderer *OrdererEtcd, orgs []*Organization, capabilities *Capabilities) *ProfilesChannelOrdererEtcd
type SystemChannelConsortium ¶
type SystemChannelConsortium struct {
Organization []*Organization `yaml:"Organization"`
}
Click to show internal directories.
Click to hide internal directories.