Documentation ¶
Index ¶
- Constants
- func DeserializeProtoValuesFromGroup(group *cb.ConfigGroup, protosStructs ...interface{}) error
- func LogSanityChecks(res Resources)
- func MarshalEtcdRaftMetadata(md *etcdraft.ConfigMetadata) ([]byte, error)
- func ValidateCapabilities(block *cb.Block, bccsp bccsp.BCCSP) error
- type Application
- type ApplicationCapabilities
- type ApplicationConfig
- type ApplicationOrg
- type ApplicationOrgConfig
- type ApplicationOrgProtos
- type ApplicationProtos
- type Bundle
- func (b *Bundle) ApplicationConfig() (Application, bool)
- func (b *Bundle) ChannelConfig() Channel
- func (b *Bundle) ConfigtxValidator() configtx.Validator
- func (b *Bundle) ConsortiumsConfig() (Consortiums, bool)
- func (b *Bundle) MSPManager() msp.MSPManager
- func (b *Bundle) OrdererConfig() (Orderer, bool)
- func (b *Bundle) PolicyManager() policies.Manager
- func (b *Bundle) ValidateNew(nb Resources) error
- type BundleActor
- type BundleSource
- func (bs *BundleSource) ApplicationConfig() (Application, bool)
- func (bs *BundleSource) ChannelConfig() Channel
- func (bs *BundleSource) ConfigtxValidator() configtx.Validator
- func (bs *BundleSource) ConsortiumsConfig() (Consortiums, bool)
- func (bs *BundleSource) MSPManager() msp.MSPManager
- func (bs *BundleSource) OrdererConfig() (Orderer, bool)
- func (bs *BundleSource) PolicyManager() policies.Manager
- func (bs *BundleSource) StableBundle() *Bundle
- func (bs *BundleSource) Update(newBundle *Bundle)
- func (bs *BundleSource) ValidateNew(resources Resources) error
- type Channel
- type ChannelCapabilities
- type ChannelConfig
- func (cc *ChannelConfig) ApplicationConfig() *ApplicationConfig
- func (cc *ChannelConfig) BlockDataHashingStructureWidth() uint32
- func (cc *ChannelConfig) Capabilities() ChannelCapabilities
- func (cc *ChannelConfig) ConsortiumName() string
- func (cc *ChannelConfig) ConsortiumsConfig() *ConsortiumsConfig
- func (cc *ChannelConfig) HashingAlgorithm() func(input []byte) []byte
- func (cc *ChannelConfig) MSPManager() msp.MSPManager
- func (cc *ChannelConfig) OrdererAddresses() []string
- func (cc *ChannelConfig) OrdererConfig() *OrdererConfig
- func (cc *ChannelConfig) Validate(channelCapabilities ChannelCapabilities) error
- type ChannelProtos
- type ChannelValues
- type ConfigValue
- type Consortium
- type ConsortiumConfig
- type ConsortiumProtos
- type Consortiums
- type ConsortiumsConfig
- type MSPConfigHandler
- type Orderer
- type OrdererCapabilities
- type OrdererConfig
- func (oc *OrdererConfig) BatchSize() *ab.BatchSize
- func (oc *OrdererConfig) BatchTimeout() time.Duration
- func (oc *OrdererConfig) Capabilities() OrdererCapabilities
- func (oc *OrdererConfig) ConsensusMetadata() []byte
- func (oc *OrdererConfig) ConsensusState() ab.ConsensusType_State
- func (oc *OrdererConfig) ConsensusType() string
- func (oc *OrdererConfig) KafkaBrokers() []string
- func (oc *OrdererConfig) MaxChannelsCount() uint64
- func (oc *OrdererConfig) Organizations() map[string]OrdererOrg
- func (oc *OrdererConfig) Validate() error
- type OrdererOrg
- type OrdererOrgConfig
- type OrdererOrgProtos
- type OrdererProtos
- type Org
- type OrganizationConfig
- type OrganizationProtos
- type PolicyMapper
- type Resources
- type StandardConfigValue
- func ACLValues(acls map[string]string) *StandardConfigValue
- func AnchorPeersValue(anchorPeers []*pb.AnchorPeer) *StandardConfigValue
- func BatchSizeValue(maxMessages, absoluteMaxBytes, preferredMaxBytes uint32) *StandardConfigValue
- func BatchTimeoutValue(timeout string) *StandardConfigValue
- func BlockDataHashingStructureValue() *StandardConfigValue
- func CapabilitiesValue(capabilities map[string]bool) *StandardConfigValue
- func ChannelCreationPolicyValue(policy *cb.Policy) *StandardConfigValue
- func ChannelRestrictionsValue(maxChannelCount uint64) *StandardConfigValue
- func ConsensusTypeValue(consensusType string, consensusMetadata []byte) *StandardConfigValue
- func ConsortiumValue(name string) *StandardConfigValue
- func EndpointsValue(addresses []string) *StandardConfigValue
- func HashingAlgorithmValue() *StandardConfigValue
- func KafkaBrokersValue(brokers []string) *StandardConfigValue
- func MSPValue(mspDef *mspprotos.MSPConfig) *StandardConfigValue
- func OrdererAddressesValue(addresses []string) *StandardConfigValue
- type StandardValues
Constants ¶
View Source
const ( ApplicationGroupKey = "Application" ACLsKey = "ACLs" )
View Source
const ( ConsortiumKey = "Consortium" HashingAlgorithmKey = "HashingAlgorithm" BlockDataHashingStructureKey = "BlockDataHashingStructure" OrdererAddressesKey = "OrdererAddresses" ChannelGroupKey = "Channel" CapabilitiesKey = "Capabilities" )
View Source
const ( ConsensusTypeKey = "ConsensusType" BatchSizeKey = "BatchSize" BatchTimeoutKey = "BatchTimeout" ChannelRestrictionsKey = "ChannelRestrictions" KafkaBrokersKey = "KafkaBrokers" EndpointsKey = "Endpoints" )
View Source
const ( ReadersPolicyKey = "Readers" WritersPolicyKey = "Writers" AdminsPolicyKey = "Admins" )
View Source
const (
AnchorPeersKey = "AnchorPeers"
)
View Source
const (
ChannelCreationPolicyKey = "ChannelCreationPolicy"
)
View Source
const (
ConsortiumsGroupKey = "Consortiums"
)
View Source
const (
MSPKey = "MSP"
)
View Source
const (
OrdererGroupKey = "Orderer"
)
View Source
const RootGroupKey = "Channel"
Variables ¶
This section is empty.
Functions ¶
func DeserializeProtoValuesFromGroup ¶
func DeserializeProtoValuesFromGroup(group *cb.ConfigGroup, protosStructs ...interface{}) error
func LogSanityChecks ¶
func LogSanityChecks(res Resources)
func MarshalEtcdRaftMetadata ¶
func MarshalEtcdRaftMetadata(md *etcdraft.ConfigMetadata) ([]byte, error)
Types ¶
type Application ¶
type Application interface { Organizations() map[string]ApplicationOrg APIPolicyMapper() PolicyMapper Capabilities() ApplicationCapabilities }
type ApplicationCapabilities ¶
type ApplicationCapabilities interface { Supported() error ForbidDuplicateTXIdInBlock() bool ACLs() bool PrivateChannelData() bool CollectionUpgrade() bool V1_1Validation() bool V1_2Validation() bool V1_3Validation() bool StorePvtDataOfInvalidTx() bool V2_0Validation() bool LifecycleV20() bool MetadataLifecycle() bool KeyLevelEndorsement() bool }
type ApplicationConfig ¶
type ApplicationConfig struct {
// contains filtered or unexported fields
}
func NewApplicationConfig ¶
func NewApplicationConfig(appGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationConfig, error)
func (*ApplicationConfig) APIPolicyMapper ¶
func (ac *ApplicationConfig) APIPolicyMapper() PolicyMapper
func (*ApplicationConfig) Capabilities ¶
func (ac *ApplicationConfig) Capabilities() ApplicationCapabilities
func (*ApplicationConfig) Organizations ¶
func (ac *ApplicationConfig) Organizations() map[string]ApplicationOrg
type ApplicationOrg ¶
type ApplicationOrg interface { Org AnchorPeers() []*pb.AnchorPeer }
type ApplicationOrgConfig ¶
type ApplicationOrgConfig struct { *OrganizationConfig // contains filtered or unexported fields }
func NewApplicationOrgConfig ¶
func NewApplicationOrgConfig(id string, orgGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationOrgConfig, error)
func (*ApplicationOrgConfig) AnchorPeers ¶
func (aog *ApplicationOrgConfig) AnchorPeers() []*pb.AnchorPeer
func (*ApplicationOrgConfig) Validate ¶
func (aoc *ApplicationOrgConfig) Validate() error
type ApplicationOrgProtos ¶
type ApplicationOrgProtos struct {
AnchorPeers *pb.AnchorPeers
}
type ApplicationProtos ¶
type ApplicationProtos struct { ACLs *pb.ACLs Capabilities *cb.Capabilities }
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func NewBundleFromEnvelope ¶
func (*Bundle) ApplicationConfig ¶
func (b *Bundle) ApplicationConfig() (Application, bool)
func (*Bundle) ChannelConfig ¶
func (*Bundle) ConfigtxValidator ¶
func (*Bundle) ConsortiumsConfig ¶
func (b *Bundle) ConsortiumsConfig() (Consortiums, bool)
func (*Bundle) MSPManager ¶
func (b *Bundle) MSPManager() msp.MSPManager
func (*Bundle) OrdererConfig ¶
func (*Bundle) PolicyManager ¶
func (*Bundle) ValidateNew ¶
type BundleActor ¶
type BundleActor func(bundle *Bundle)
type BundleSource ¶
type BundleSource struct {
// contains filtered or unexported fields
}
func NewBundleSource ¶
func NewBundleSource(bundle *Bundle, callbacks ...BundleActor) *BundleSource
func (*BundleSource) ApplicationConfig ¶
func (bs *BundleSource) ApplicationConfig() (Application, bool)
func (*BundleSource) ChannelConfig ¶
func (bs *BundleSource) ChannelConfig() Channel
func (*BundleSource) ConfigtxValidator ¶
func (bs *BundleSource) ConfigtxValidator() configtx.Validator
func (*BundleSource) ConsortiumsConfig ¶
func (bs *BundleSource) ConsortiumsConfig() (Consortiums, bool)
func (*BundleSource) MSPManager ¶
func (bs *BundleSource) MSPManager() msp.MSPManager
func (*BundleSource) OrdererConfig ¶
func (bs *BundleSource) OrdererConfig() (Orderer, bool)
func (*BundleSource) PolicyManager ¶
func (bs *BundleSource) PolicyManager() policies.Manager
func (*BundleSource) StableBundle ¶
func (bs *BundleSource) StableBundle() *Bundle
func (*BundleSource) Update ¶
func (bs *BundleSource) Update(newBundle *Bundle)
func (*BundleSource) ValidateNew ¶
func (bs *BundleSource) ValidateNew(resources Resources) error
type Channel ¶
type Channel interface { HashingAlgorithm() func(input []byte) []byte BlockDataHashingStructureWidth() uint32 OrdererAddresses() []string Capabilities() ChannelCapabilities }
type ChannelCapabilities ¶
type ChannelCapabilities interface { Supported() error MSPVersion() msp.MSPVersion ConsensusTypeMigration() bool OrgSpecificOrdererEndpoints() bool }
type ChannelConfig ¶
type ChannelConfig struct {
// contains filtered or unexported fields
}
func NewChannelConfig ¶
func NewChannelConfig(channelGroup *cb.ConfigGroup, bccsp bccsp.BCCSP) (*ChannelConfig, error)
func (*ChannelConfig) ApplicationConfig ¶
func (cc *ChannelConfig) ApplicationConfig() *ApplicationConfig
func (*ChannelConfig) BlockDataHashingStructureWidth ¶
func (cc *ChannelConfig) BlockDataHashingStructureWidth() uint32
func (*ChannelConfig) Capabilities ¶
func (cc *ChannelConfig) Capabilities() ChannelCapabilities
func (*ChannelConfig) ConsortiumName ¶
func (cc *ChannelConfig) ConsortiumName() string
func (*ChannelConfig) ConsortiumsConfig ¶
func (cc *ChannelConfig) ConsortiumsConfig() *ConsortiumsConfig
func (*ChannelConfig) HashingAlgorithm ¶
func (cc *ChannelConfig) HashingAlgorithm() func(input []byte) []byte
func (*ChannelConfig) MSPManager ¶
func (cc *ChannelConfig) MSPManager() msp.MSPManager
func (*ChannelConfig) OrdererAddresses ¶
func (cc *ChannelConfig) OrdererAddresses() []string
func (*ChannelConfig) OrdererConfig ¶
func (cc *ChannelConfig) OrdererConfig() *OrdererConfig
func (*ChannelConfig) Validate ¶
func (cc *ChannelConfig) Validate(channelCapabilities ChannelCapabilities) error
type ChannelProtos ¶
type ChannelProtos struct { HashingAlgorithm *cb.HashingAlgorithm BlockDataHashingStructure *cb.BlockDataHashingStructure OrdererAddresses *cb.OrdererAddresses Consortium *cb.Consortium Capabilities *cb.Capabilities }
type ChannelValues ¶
type ConfigValue ¶
type Consortium ¶
type ConsortiumConfig ¶
type ConsortiumConfig struct {
// contains filtered or unexported fields
}
func NewConsortiumConfig ¶
func NewConsortiumConfig(consortiumGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ConsortiumConfig, error)
func (*ConsortiumConfig) ChannelCreationPolicy ¶
func (cc *ConsortiumConfig) ChannelCreationPolicy() *cb.Policy
func (*ConsortiumConfig) Organizations ¶
func (cc *ConsortiumConfig) Organizations() map[string]Org
type ConsortiumProtos ¶
type Consortiums ¶
type Consortiums interface {
Consortiums() map[string]Consortium
}
type ConsortiumsConfig ¶
type ConsortiumsConfig struct {
// contains filtered or unexported fields
}
func NewConsortiumsConfig ¶
func NewConsortiumsConfig(consortiumsGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ConsortiumsConfig, error)
func (*ConsortiumsConfig) Consortiums ¶
func (cc *ConsortiumsConfig) Consortiums() map[string]Consortium
type MSPConfigHandler ¶
type MSPConfigHandler struct {
// contains filtered or unexported fields
}
func NewMSPConfigHandler ¶
func NewMSPConfigHandler(mspVersion msp.MSPVersion, bccsp bccsp.BCCSP) *MSPConfigHandler
func (*MSPConfigHandler) CreateMSPManager ¶
func (bh *MSPConfigHandler) CreateMSPManager() (msp.MSPManager, error)
func (*MSPConfigHandler) ProposeMSP ¶
type Orderer ¶
type Orderer interface { ConsensusType() string ConsensusMetadata() []byte ConsensusState() ab.ConsensusType_State BatchSize() *ab.BatchSize BatchTimeout() time.Duration MaxChannelsCount() uint64 KafkaBrokers() []string Organizations() map[string]OrdererOrg Capabilities() OrdererCapabilities }
type OrdererCapabilities ¶
type OrdererConfig ¶
type OrdererConfig struct {
// contains filtered or unexported fields
}
func NewOrdererConfig ¶
func NewOrdererConfig(ordererGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler, channelCapabilities ChannelCapabilities) (*OrdererConfig, error)
func (*OrdererConfig) BatchSize ¶
func (oc *OrdererConfig) BatchSize() *ab.BatchSize
func (*OrdererConfig) BatchTimeout ¶
func (oc *OrdererConfig) BatchTimeout() time.Duration
func (*OrdererConfig) Capabilities ¶
func (oc *OrdererConfig) Capabilities() OrdererCapabilities
func (*OrdererConfig) ConsensusMetadata ¶
func (oc *OrdererConfig) ConsensusMetadata() []byte
func (*OrdererConfig) ConsensusState ¶
func (oc *OrdererConfig) ConsensusState() ab.ConsensusType_State
func (*OrdererConfig) ConsensusType ¶
func (oc *OrdererConfig) ConsensusType() string
func (*OrdererConfig) KafkaBrokers ¶
func (oc *OrdererConfig) KafkaBrokers() []string
func (*OrdererConfig) MaxChannelsCount ¶
func (oc *OrdererConfig) MaxChannelsCount() uint64
func (*OrdererConfig) Organizations ¶
func (oc *OrdererConfig) Organizations() map[string]OrdererOrg
func (*OrdererConfig) Validate ¶
func (oc *OrdererConfig) Validate() error
type OrdererOrg ¶
type OrdererOrgConfig ¶
type OrdererOrgConfig struct { *OrganizationConfig // contains filtered or unexported fields }
func NewOrdererOrgConfig ¶
func NewOrdererOrgConfig(orgName string, orgGroup *cb.ConfigGroup, mspConfigHandler *MSPConfigHandler, channelCapabilities ChannelCapabilities) (*OrdererOrgConfig, error)
func (*OrdererOrgConfig) Endpoints ¶
func (oc *OrdererOrgConfig) Endpoints() []string
func (*OrdererOrgConfig) Validate ¶
func (ooc *OrdererOrgConfig) Validate() error
type OrdererOrgProtos ¶
type OrdererOrgProtos struct {
Endpoints *cb.OrdererAddresses
}
type OrdererProtos ¶
type OrdererProtos struct { ConsensusType *ab.ConsensusType BatchSize *ab.BatchSize BatchTimeout *ab.BatchTimeout KafkaBrokers *ab.KafkaBrokers ChannelRestrictions *ab.ChannelRestrictions Capabilities *cb.Capabilities }
type OrganizationConfig ¶
type OrganizationConfig struct {
// contains filtered or unexported fields
}
func NewOrganizationConfig ¶
func NewOrganizationConfig(name string, orgGroup *cb.ConfigGroup, mspConfigHandler *MSPConfigHandler) (*OrganizationConfig, error)
func (*OrganizationConfig) MSPID ¶
func (oc *OrganizationConfig) MSPID() string
func (*OrganizationConfig) Name ¶
func (oc *OrganizationConfig) Name() string
func (*OrganizationConfig) Validate ¶
func (oc *OrganizationConfig) Validate() error
type OrganizationProtos ¶
type PolicyMapper ¶
type Resources ¶
type Resources interface { ConfigtxValidator() configtx.Validator PolicyManager() policies.Manager ChannelConfig() Channel OrdererConfig() (Orderer, bool) ConsortiumsConfig() (Consortiums, bool) ApplicationConfig() (Application, bool) MSPManager() msp.MSPManager ValidateNew(resources Resources) error }
type StandardConfigValue ¶
type StandardConfigValue struct {
// contains filtered or unexported fields
}
func ACLValues ¶
func ACLValues(acls map[string]string) *StandardConfigValue
func AnchorPeersValue ¶
func AnchorPeersValue(anchorPeers []*pb.AnchorPeer) *StandardConfigValue
func BatchSizeValue ¶
func BatchSizeValue(maxMessages, absoluteMaxBytes, preferredMaxBytes uint32) *StandardConfigValue
func BatchTimeoutValue ¶
func BatchTimeoutValue(timeout string) *StandardConfigValue
func BlockDataHashingStructureValue ¶
func BlockDataHashingStructureValue() *StandardConfigValue
func CapabilitiesValue ¶
func CapabilitiesValue(capabilities map[string]bool) *StandardConfigValue
func ChannelCreationPolicyValue ¶
func ChannelCreationPolicyValue(policy *cb.Policy) *StandardConfigValue
func ChannelRestrictionsValue ¶
func ChannelRestrictionsValue(maxChannelCount uint64) *StandardConfigValue
func ConsensusTypeValue ¶
func ConsensusTypeValue(consensusType string, consensusMetadata []byte) *StandardConfigValue
func ConsortiumValue ¶
func ConsortiumValue(name string) *StandardConfigValue
func EndpointsValue ¶
func EndpointsValue(addresses []string) *StandardConfigValue
func HashingAlgorithmValue ¶
func HashingAlgorithmValue() *StandardConfigValue
func KafkaBrokersValue ¶
func KafkaBrokersValue(brokers []string) *StandardConfigValue
func MSPValue ¶
func MSPValue(mspDef *mspprotos.MSPConfig) *StandardConfigValue
func OrdererAddressesValue ¶
func OrdererAddressesValue(addresses []string) *StandardConfigValue
func (*StandardConfigValue) Key ¶
func (scv *StandardConfigValue) Key() string
func (*StandardConfigValue) Value ¶
func (scv *StandardConfigValue) Value() proto.Message
type StandardValues ¶
type StandardValues struct {
// contains filtered or unexported fields
}
func NewStandardValues ¶
func NewStandardValues(protosStructs ...interface{}) (*StandardValues, error)
func (*StandardValues) Deserialize ¶
Click to show internal directories.
Click to hide internal directories.