{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package channelconfig\n\n## Constants\n\n```go\nconst (\n\t// ApplicationGroupKey is the group name for the Application config\n\tApplicationGroupKey = \"Application\"\n\n\t// ACLsKey is the name of the ACLs config\n\tACLsKey = \"ACLs\"\n)\n```\n\n```go\nconst (\n\t// ConsortiumKey is the key for the cb.ConfigValue for the Consortium message\n\tConsortiumKey = \"Consortium\"\n\n\t// HashingAlgorithmKey is the cb.ConfigItem type key name for the HashingAlgorithm message\n\tHashingAlgorithmKey = \"HashingAlgorithm\"\n\n\t// BlockDataHashingStructureKey is the cb.ConfigItem type key name for the BlockDataHashingStructure message\n\tBlockDataHashingStructureKey = \"BlockDataHashingStructure\"\n\n\t// OrdererAddressesKey is the cb.ConfigItem type key name for the OrdererAddresses message\n\tOrdererAddressesKey = \"OrdererAddresses\"\n\n\t// GroupKey is the name of the channel group\n\tChannelGroupKey = \"Channel\"\n\n\t// CapabilitiesKey is the name of the key which refers to capabilities, it appears at the channel,\n\t// application, and orderer levels and this constant is used for all three.\n\tCapabilitiesKey = \"Capabilities\"\n)\n```\nChannel config keys\n\n```go\nconst (\n\t// ConsensusTypeKey is the cb.ConfigItem type key name for the ConsensusType message.\n\tConsensusTypeKey = \"ConsensusType\"\n\n\t// BatchSizeKey is the cb.ConfigItem type key name for the BatchSize message.\n\tBatchSizeKey = \"BatchSize\"\n\n\t// BatchTimeoutKey is the cb.ConfigItem type key name for the BatchTimeout message.\n\tBatchTimeoutKey = \"BatchTimeout\"\n\n\t// ChannelRestrictionsKey is the key name for the ChannelRestrictions message.\n\tChannelRestrictionsKey = \"ChannelRestrictions\"\n\n\t// KafkaBrokersKey is the cb.ConfigItem type key name for the KafkaBrokers message.\n\tKafkaBrokersKey = \"KafkaBrokers\"\n\n\t// EndpointsKey is the cb.COnfigValue key name for the Endpoints message in the OrdererOrgGroup.\n\tEndpointsKey = \"Endpoints\"\n)\n```\n\n```go\nconst (\n\t// ReadersPolicyKey is the key used for the read policy\n\tReadersPolicyKey = \"Readers\"\n\n\t// WritersPolicyKey is the key used for the read policy\n\tWritersPolicyKey = \"Writers\"\n\n\t// AdminsPolicyKey is the key used for the read policy\n\tAdminsPolicyKey = \"Admins\"\n)\n```\n\n```go\nconst (\n\t// AnchorPeersKey is the key name for the AnchorPeers ConfigValue\n\tAnchorPeersKey = \"AnchorPeers\"\n)\n```\n\n```go\nconst (\n\t// ChannelCreationPolicyKey is the key used in the consortium config to denote the policy\n\t// to be used in evaluating whether a channel creation request is authorized\n\tChannelCreationPolicyKey = \"ChannelCreationPolicy\"\n)\n```\n\n```go\nconst (\n\t// ConsortiumsGroupKey is the group name for the consortiums config\n\tConsortiumsGroupKey = \"Consortiums\"\n)\n```\n\n```go\nconst (\n\t// MSPKey is the key for the MSP definition in orderer groups\n\tMSPKey = \"MSP\"\n)\n```\n\n```go\nconst (\n\t// OrdererGroupKey is the group name for the orderer config.\n\tOrdererGroupKey = \"Orderer\"\n)\n```\n\n```go\nconst RootGroupKey = \"Channel\"\n```\nRootGroupKey is the key for namespacing the channel config, especially for policy evaluation.\n\n## Functions\n\n```go\nfunc DeserializeProtoValuesFromGroup(group *cb.ConfigGroup, protosStructs ...interface{}) error\n```\nDeserializeGroup deserializes the value for all values in a config group\n\n```go\nfunc LogSanityChecks(res Resources)\n```\n\n## Types\n\n```go\ntype Application interface {\n\t// Organizations returns a map of org ID to ApplicationOrg\n\tOrganizations() map[string]ApplicationOrg\n\n\t// APIPolicyMapper returns a PolicyMapper that maps API names to policies\n\tAPIPolicyMapper() PolicyMapper\n\n\t// Capabilities defines the capabilities for the application portion of a channel\n\tCapabilities() ApplicationCapabilities\n}\n```\nApplication stores the common shared application config\n\n```go\ntype ApplicationCapabilities interface {\n\t// Supported returns an error if there are unknown capabilities in this channel which are required\n\tSupported() error\n\n\t// ForbidDuplicateTXIdInBlock specifies whether two transactions with the same TXId are permitted\n\t// in the same block or whether we mark the second one as TxValidationCode_DUPLICATE_TXID\n\tForbidDuplicateTXIdInBlock() bool\n\n\t// ACLs returns true is ACLs may be specified in the Application portion of the config tree\n\tACLs() bool\n\n\t// PrivateChannelData returns true if support for private channel data (a.k.a. collections) is enabled.\n\t// In v1.1, the private channel data is experimental and has to be enabled explicitly.\n\t// In v1.2, the private channel data is enabled by default.\n\tPrivateChannelData() bool\n\n\t// CollectionUpgrade returns true if this channel is configured to allow updates to\n\t// existing collection or add new collections through chaincode upgrade (as introduced in v1.2)\n\tCollectionUpgrade() bool\n\n\t// V1_1Validation returns true is this channel is configured to perform stricter validation\n\t// of transactions (as introduced in v1.1).\n\tV1_1Validation() bool\n\n\t// V1_2Validation returns true is this channel is configured to perform stricter validation\n\t// of transactions (as introduced in v1.2).\n\tV1_2Validation() bool\n\n\t// V1_3Validation returns true if this channel supports transaction validation\n\t// as introduced in v1.3. This includes:\n\t//  - policies expressible at a ledger key granularity, as described in FAB-8812\n\t//  - new chaincode lifecycle, as described in FAB-11237\n\tV1_3Validation() bool\n\n\t// StorePvtDataOfInvalidTx() returns true if the peer needs to store the pvtData of\n\t// invalid transactions.\n\tStorePvtDataOfInvalidTx() bool\n\n\t// MetadataLifecycle indicates whether the peer should use the deprecated and problematic\n\t// v1.0/v1.1 lifecycle, or whether it should use the newer per channel peer local chaincode\n\t// metadata package approach planned for release with Fabric v1.2\n\tMetadataLifecycle() bool\n\n\t// KeyLevelEndorsement returns true if this channel supports endorsement\n\t// policies expressible at a ledger key granularity, as described in FAB-8812\n\tKeyLevelEndorsement() bool\n\n\t// FabToken returns true if this channel supports FabToken functions\n\tFabToken() bool\n}\n```\nApplicationCapabilities defines the capabilities for the application portion of a channel\n\n```go\ntype ApplicationConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nApplicationConfig implements the Application interface\n\n```go\nfunc NewApplicationConfig(appGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationConfig, error)\n```\nNewApplicationConfig creates config from an Application config group\n\n```go\nfunc (ac *ApplicationConfig) APIPolicyMapper() PolicyMapper\n```\nAPIPolicyMapper returns a PolicyMapper that maps API names to policies\n\n```go\nfunc (ac *ApplicationConfig) Capabilities() ApplicationCapabilities\n```\nCapabilities returns a map of capability name to Capability\n\n```go\nfunc (ac *ApplicationConfig) Organizations() map[string]ApplicationOrg\n```\nOrganizations returns a map of org ID to ApplicationOrg\n\n```go\ntype ApplicationOrg interface {\n\tOrg\n\n\t// AnchorPeers returns the list of gossip anchor peers\n\tAnchorPeers() []*pb.AnchorPeer\n}\n```\nApplicationOrg stores the per org application config\n\n```go\ntype ApplicationOrgConfig struct {\n\t*OrganizationConfig\n\t// contains filtered or unexported fields\n}\n```\nApplicationOrgConfig defines the configuration for an application org\n\n```go\nfunc NewApplicationOrgConfig(id string, orgGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationOrgConfig, error)\n```\nNewApplicationOrgConfig creates a new config for an application org\n\n```go\nfunc (aog *ApplicationOrgConfig) AnchorPeers() []*pb.AnchorPeer\n```\nAnchorPeers returns the list of anchor peers of this Organization\n\n```go\nfunc (aoc *ApplicationOrgConfig) Validate() error\n```\n\n```go\ntype ApplicationOrgProtos struct {\n\tAnchorPeers *pb.AnchorPeers\n}\n```\nApplicationOrgProtos are deserialized from the config\n\n```go\ntype ApplicationProtos struct {\n\tACLs         *pb.ACLs\n\tCapabilities *cb.Capabilities\n}\n```\nApplicationProtos is used as the source of the ApplicationConfig\n\n```go\ntype Bundle struct {\n\t// contains filtered or unexported fields\n}\n```\nBundle is a collection of resources which will always have a consistent view of the channel configuration.  In particular, for a given bundle reference, the config sequence, the policy manager etc. will always return exactly the same value.  The Bundle structure is immutable and will always be replaced in its entirety, with new backing memory.\n\n```go\nfunc NewBundle(channelID string, config *cb.Config) (*Bundle, error)\n```\nNewBundle creates a new immutable bundle of configuration\n\n```go\nfunc NewBundleFromEnvelope(env *cb.Envelope) (*Bundle, error)\n```\nNewBundleFromEnvelope wraps the NewBundle function, extracting the needed information from a full configtx\n\n```go\nfunc (b *Bundle) ApplicationConfig() (Application, bool)\n```\nApplicationConfig returns the configtxapplication.SharedConfig for the channel and whether the Application config exists.\n\n```go\nfunc (b *Bundle) ChannelConfig() Channel\n```\nChannelConfig returns the config.Channel for the chain.\n\n```go\nfunc (b *Bundle) ConfigtxValidator() configtx.Validator\n```\nConfigtxValidator returns the configtx.Validator for the channel.\n\n```go\nfunc (b *Bundle) ConsortiumsConfig() (Consortiums, bool)\n```\nConsortiumsConfig returns the config.Consortiums for the channel and whether the consortiums config exists.\n\n```go\nfunc (b *Bundle) MSPManager() msp.MSPManager\n```\nMSPManager returns the MSP manager constructed for this config.\n\n```go\nfunc (b *Bundle) OrdererConfig() (Orderer, bool)\n```\nOrdererConfig returns the config.Orderer for the channel and whether the Orderer config exists.\n\n```go\nfunc (b *Bundle) PolicyManager() policies.Manager\n```\nPolicyManager returns the policy manager constructed for this config.\n\n```go\nfunc (b *Bundle) ValidateNew(nb Resources) error\n```\nValidateNew checks if a new bundle's contained configuration is valid to be derived from the current bundle. This allows checks of the nature \"Make sure that the consensus type did not change\".\n\n```go\ntype BundleActor func(bundle *Bundle)\n```\nBundleActor performs an operation based on the given bundle\n\n```go\ntype BundleSource struct {\n\t// contains filtered or unexported fields\n}\n```\nBundleSource stores a reference to the current configuration bundle It also provides a method to update this bundle.  The assorted methods largely pass through to the underlying bundle, but do so through an atomic pointer so that gross go-routine reads are not vulnerable to out-of-order execution memory type bugs.\n\n```go\nfunc NewBundleSource(bundle *Bundle, callbacks ...BundleActor) *BundleSource\n```\nNewBundleSource creates a new BundleSource with an initial Bundle value The callbacks will be invoked whenever the Update method is called for the BundleSource.  Note, these callbacks are called immediately before this function returns.\n\n```go\nfunc (bs *BundleSource) ApplicationConfig() (Application, bool)\n```\nApplicationConfig returns the Application config for the channel and whether the Application config exists\n\n```go\nfunc (bs *BundleSource) ChannelConfig() Channel\n```\nChannelConfig returns the config.Channel for the chain\n\n```go\nfunc (bs *BundleSource) ConfigtxValidator() configtx.Validator\n```\nConfigtxValidator returns the configtx.Validator for the channel\n\n```go\nfunc (bs *BundleSource) ConsortiumsConfig() (Consortiums, bool)\n```\nConsortiumsConfig() returns the config.Consortiums for the channel and whether the consortiums config exists\n\n```go\nfunc (bs *BundleSource) MSPManager() msp.MSPManager\n```\nMSPManager returns the MSP manager constructed for this config\n\n```go\nfunc (bs *BundleSource) OrdererConfig() (Orderer, bool)\n```\nOrdererConfig returns the config.Orderer for the channel and whether the Orderer config exists\n\n```go\nfunc (bs *BundleSource) PolicyManager() policies.Manager\n```\nPolicyManager returns the policy manager constructed for this config\n\n```go\nfunc (bs *BundleSource) StableBundle() *Bundle\n```\nStableBundle returns a pointer to a stable Bundle. It is stable because calls to its assorted methods will always return the same result, as the underlying data structures are immutable.  For instance, calling BundleSource.Orderer() and BundleSource.MSPManager() to get first the list of orderer orgs, then querying the MSP for those org definitions could result in a bug because an update might replace the underlying Bundle in between.  Therefore, for operations which require consistency between the Bundle calls, the caller should first retrieve a StableBundle, then operate on it.\n\n```go\nfunc (bs *BundleSource) Update(newBundle *Bundle)\n```\nUpdate sets a new bundle as the bundle source and calls any registered callbacks\n\n```go\nfunc (bs *BundleSource) ValidateNew(resources Resources) error\n```\nValidateNew passes through to the current bundle\n\n```go\ntype Channel interface {\n\t// HashingAlgorithm returns the default algorithm to be used when hashing\n\t// such as computing block hashes, and CreationPolicy digests\n\tHashingAlgorithm() func(input []byte) []byte\n\n\t// BlockDataHashingStructureWidth returns the width to use when constructing the\n\t// Merkle tree to compute the BlockData hash\n\tBlockDataHashingStructureWidth() uint32\n\n\t// OrdererAddresses returns the list of valid orderer addresses to connect to to invoke Broadcast/Deliver\n\tOrdererAddresses() []string\n\n\t// Capabilities defines the capabilities for a channel\n\tCapabilities() ChannelCapabilities\n}\n```\nChannel gives read only access to the channel configuration\n\n```go\ntype ChannelCapabilities interface {\n\t// Supported returns an error if there are unknown capabilities in this channel which are required\n\tSupported() error\n\n\t// MSPVersion specifies the version of the MSP this channel must understand, including the MSP types\n\t// and MSP principal types.\n\tMSPVersion() msp.MSPVersion\n\n\t// ConsensusTypeMigration return true if consensus-type migration is permitted in both orderer and peer.\n\tConsensusTypeMigration() bool\n\n\t// OrgSpecificOrdererEndpoints return true if the channel config processing allows orderer orgs to specify their own endpoints\n\tOrgSpecificOrdererEndpoints() bool\n}\n```\nChannelCapabilities defines the capabilities for a channel\n\n```go\ntype ChannelConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nChannelConfig stores the channel configuration\n\n```go\nfunc NewChannelConfig(channelGroup *cb.ConfigGroup) (*ChannelConfig, error)\n```\nNewChannelConfig creates a new ChannelConfig\n\n```go\nfunc (cc *ChannelConfig) ApplicationConfig() *ApplicationConfig\n```\nApplicationConfig returns the application config associated with this channel\n\n```go\nfunc (cc *ChannelConfig) BlockDataHashingStructureWidth() uint32\n```\nBlockDataHashingStructure returns the width to use when forming the block data hashing structure\n\n```go\nfunc (cc *ChannelConfig) Capabilities() ChannelCapabilities\n```\nCapabilities returns information about the available capabilities for this channel\n\n```go\nfunc (cc *ChannelConfig) ConsortiumName() string\n```\nConsortiumName returns the name of the consortium this channel was created under\n\n```go\nfunc (cc *ChannelConfig) ConsortiumsConfig() *ConsortiumsConfig\n```\nConsortiumsConfig returns the consortium config associated with this channel if it exists\n\n```go\nfunc (cc *ChannelConfig) HashingAlgorithm() func(input []byte) []byte\n```\nHashingAlgorithm returns a function pointer to the chain hashing algorihtm\n\n```go\nfunc (cc *ChannelConfig) MSPManager() msp.MSPManager\n```\nMSPManager returns the MSP manager for this config\n\n```go\nfunc (cc *ChannelConfig) OrdererAddresses() []string\n```\nOrdererAddresses returns the list of valid orderer addresses to connect to to invoke Broadcast/Deliver\n\n```go\nfunc (cc *ChannelConfig) OrdererConfig() *OrdererConfig\n```\nOrdererConfig returns the orderer config associated with this channel\n\n```go\nfunc (cc *ChannelConfig) Validate(channelCapabilities ChannelCapabilities) error\n```\nValidate inspects the generated configuration protos and ensures that the values are correct\n\n```go\ntype ChannelProtos struct {\n\tHashingAlgorithm          *cb.HashingAlgorithm\n\tBlockDataHashingStructure *cb.BlockDataHashingStructure\n\tOrdererAddresses          *cb.OrdererAddresses\n\tConsortium                *cb.Consortium\n\tCapabilities              *cb.Capabilities\n}\n```\nChannelProtos is where the proposed configuration is unmarshaled into\n\n```go\ntype ChannelValues interface {\n\t// HashingAlgorithm returns the default algorithm to be used when hashing\n\t// such as computing block hashes, and CreationPolicy digests\n\tHashingAlgorithm() func(input []byte) []byte\n\n\t// BlockDataHashingStructureWidth returns the width to use when constructing the\n\t// Merkle tree to compute the BlockData hash\n\tBlockDataHashingStructureWidth() uint32\n\n\t// OrdererAddresses returns the list of valid orderer addresses to connect to to invoke Broadcast/Deliver\n\tOrdererAddresses() []string\n}\n```\nChannelValues gives read only access to the channel configuration\n\n```go\ntype ConfigValue interface {\n\t// Key is the key this value should be stored in the *cb.ConfigGroup.Values map.\n\tKey() string\n\n\t// Value is the message which should be marshaled to opaque bytes for the *cb.ConfigValue.value.\n\tValue() proto.Message\n}\n```\nConfigValue defines a common representation for different \\*cb.ConfigValue values.\n\n```go\ntype Consortium interface {\n\t// ChannelCreationPolicy returns the policy to check when instantiating a channel for this consortium\n\tChannelCreationPolicy() *cb.Policy\n\n\t// Organizations returns the organizations for this consortium\n\tOrganizations() map[string]Org\n}\n```\nConsortium represents a group of orgs which may create channels together\n\n```go\ntype ConsortiumConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nConsortiumConfig holds the consoritums configuration information\n\n```go\nfunc NewConsortiumConfig(consortiumGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ConsortiumConfig, error)\n```\nNewConsortiumConfig creates a new instance of the consoritums config\n\n```go\nfunc (cc *ConsortiumConfig) ChannelCreationPolicy() *cb.Policy\n```\nCreationPolicy returns the policy structure used to validate the channel creation\n\n```go\nfunc (cc *ConsortiumConfig) Organizations() map[string]Org\n```\nOrganizations returns the set of organizations in the consortium\n\n```go\ntype ConsortiumProtos struct {\n\tChannelCreationPolicy *cb.Policy\n}\n```\nConsortiumProtos holds the config protos for the consortium config\n\n```go\ntype Consortiums interface {\n\t// Consortiums returns the set of consortiums\n\tConsortiums() map[string]Consortium\n}\n```\nConsortiums represents the set of consortiums serviced by an ordering service\n\n```go\ntype ConsortiumsConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nConsortiumsConfig holds the consoritums configuration information\n\n```go\nfunc NewConsortiumsConfig(consortiumsGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ConsortiumsConfig, error)\n```\nNewConsortiumsConfig creates a new instance of the consoritums config\n\n```go\nfunc (cc *ConsortiumsConfig) Consortiums() map[string]Consortium\n```\nConsortiums returns a map of the current consortiums\n\n```go\ntype MSPConfigHandler struct {\n\t// contains filtered or unexported fields\n}\n```\nMSPConfigHandler\n\n```go\nfunc NewMSPConfigHandler(mspVersion msp.MSPVersion) *MSPConfigHandler\n```\n\n```go\nfunc (bh *MSPConfigHandler) CreateMSPManager() (msp.MSPManager, error)\n```\n\n```go\nfunc (bh *MSPConfigHandler) ProposeMSP(mspConfig *mspprotos.MSPConfig) (msp.MSP, error)\n```\nProposeValue called when an org defines an MSP\n\n```go\ntype Orderer interface {\n\t// ConsensusType returns the configured consensus type\n\tConsensusType() string\n\n\t// ConsensusMetadata returns the metadata associated with the consensus type.\n\tConsensusMetadata() []byte\n\n\t// ConsensusState returns the consensus-type state.\n\tConsensusState() ab.ConsensusType_State\n\n\t// BatchSize returns the maximum number of messages to include in a block\n\tBatchSize() *ab.BatchSize\n\n\t// BatchTimeout returns the amount of time to wait before creating a batch\n\tBatchTimeout() time.Duration\n\n\t// MaxChannelsCount returns the maximum count of channels to allow for an ordering network\n\tMaxChannelsCount() uint64\n\n\t// KafkaBrokers returns the addresses (IP:port notation) of a set of \"bootstrap\"\n\t// Kafka brokers, i.e. this is not necessarily the entire set of Kafka brokers\n\t// used for ordering\n\tKafkaBrokers() []string\n\n\t// Organizations returns the organizations for the ordering service\n\tOrganizations() map[string]OrdererOrg\n\n\t// Capabilities defines the capabilities for the orderer portion of a channel\n\tCapabilities() OrdererCapabilities\n}\n```\nOrderer stores the common shared orderer config\n\n```go\ntype OrdererCapabilities interface {\n\t// PredictableChannelTemplate specifies whether the v1.0 undesirable behavior of setting the /Channel\n\t// group's mod_policy to \"\" and copy versions from the orderer system channel config should be fixed or not.\n\tPredictableChannelTemplate() bool\n\n\t// Resubmission specifies whether the v1.0 non-deterministic commitment of tx should be fixed by re-submitting\n\t// the re-validated tx.\n\tResubmission() bool\n\n\t// Supported returns an error if there are unknown capabilities in this channel which are required\n\tSupported() error\n\n\t// ExpirationCheck specifies whether the orderer checks for identity expiration checks\n\t// when validating messages\n\tExpirationCheck() bool\n\n\t// ConsensusTypeMigration checks whether the orderer permits a consensus-type migration.\n\tConsensusTypeMigration() bool\n}\n```\nOrdererCapabilities defines the capabilities for the orderer portion of a channel\n\n```go\ntype OrdererConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nOrdererConfig holds the orderer configuration information.\n\n```go\nfunc NewOrdererConfig(ordererGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler, channelCapabilities ChannelCapabilities) (*OrdererConfig, error)\n```\nNewOrdererConfig creates a new instance of the orderer config.\n\n```go\nfunc (oc *OrdererConfig) BatchSize() *ab.BatchSize\n```\nBatchSize returns the maximum number of messages to include in a block.\n\n```go\nfunc (oc *OrdererConfig) BatchTimeout() time.Duration\n```\nBatchTimeout returns the amount of time to wait before creating a batch.\n\n```go\nfunc (oc *OrdererConfig) Capabilities() OrdererCapabilities\n```\nCapabilities returns the capabilities the ordering network has for this channel.\n\n```go\nfunc (oc *OrdererConfig) ConsensusMetadata() []byte\n```\nConsensusMetadata returns the metadata associated with the consensus type.\n\n```go\nfunc (oc *OrdererConfig) ConsensusState() ab.ConsensusType_State\n```\nConsensusState return the consensus type state.\n\n```go\nfunc (oc *OrdererConfig) ConsensusType() string\n```\nConsensusType returns the configured consensus type.\n\n```go\nfunc (oc *OrdererConfig) KafkaBrokers() []string\n```\nKafkaBrokers returns the addresses (IP:port notation) of a set of \"bootstrap\" Kafka brokers, i.e. this is not necessarily the entire set of Kafka brokers used for ordering.\n\n```go\nfunc (oc *OrdererConfig) MaxChannelsCount() uint64\n```\nMaxChannelsCount returns the maximum count of channels this orderer supports.\n\n```go\nfunc (oc *OrdererConfig) Organizations() map[string]OrdererOrg\n```\nOrganizations returns a map of the orgs in the channel.\n\n```go\nfunc (oc *OrdererConfig) Validate() error\n```\n\n```go\ntype OrdererOrg interface {\n\tOrg\n\n\t// Endpoints returns the endpoints of orderer nodes.\n\tEndpoints() []string\n}\n```\nOrdererOrg stores the per org orderer config.\n\n```go\ntype OrdererOrgConfig struct {\n\t*OrganizationConfig\n\t// contains filtered or unexported fields\n}\n```\nOrdererOrgConfig defines the configuration for an orderer org\n\n```go\nfunc NewOrdererOrgConfig(orgName string, orgGroup *cb.ConfigGroup, mspConfigHandler *MSPConfigHandler, channelCapabilities ChannelCapabilities) (*OrdererOrgConfig, error)\n```\nNewOrdererOrgConfig returns an orderer org config built from the given ConfigGroup.\n\n```go\nfunc (oc *OrdererOrgConfig) Endpoints() []string\n```\nEndpoints returns the set of addresses this ordering org exposes as orderers\n\n```go\nfunc (ooc *OrdererOrgConfig) Validate() error\n```\n\n```go\ntype OrdererOrgProtos struct {\n\tEndpoints *cb.OrdererAddresses\n}\n```\nOrdererOrgProtos are deserialized from the Orderer org config values\n\n```go\ntype OrdererProtos struct {\n\tConsensusType       *ab.ConsensusType\n\tBatchSize           *ab.BatchSize\n\tBatchTimeout        *ab.BatchTimeout\n\tKafkaBrokers        *ab.KafkaBrokers\n\tChannelRestrictions *ab.ChannelRestrictions\n\tCapabilities        *cb.Capabilities\n}\n```\nOrdererProtos is used as the source of the OrdererConfig.\n\n```go\ntype Org interface {\n\t// Name returns the name this org is referred to in config\n\tName() string\n\n\t// MSPID returns the MSP ID associated with this org\n\tMSPID() string\n}\n```\nOrg stores the common organizational config\n\n```go\ntype OrganizationConfig struct {\n\t// contains filtered or unexported fields\n}\n```\nOrganizationConfig stores the configuration for an organization\n\n```go\nfunc NewOrganizationConfig(name string, orgGroup *cb.ConfigGroup, mspConfigHandler *MSPConfigHandler) (*OrganizationConfig, error)\n```\nNewOrganizationConfig creates a new config for an organization\n\n```go\nfunc (oc *OrganizationConfig) MSPID() string\n```\nMSPID returns the MSP ID associated with this org\n\n```go\nfunc (oc *OrganizationConfig) Name() string\n```\nName returns the name this org is referred to in config\n\n```go\nfunc (oc *OrganizationConfig) Validate() error\n```\nValidate returns whether the configuration is valid\n\n```go\ntype OrganizationProtos struct {\n\tMSP *mspprotos.MSPConfig\n}\n```\nOrganizationProtos are used to deserialize the organization config\n\n```go\ntype PolicyMapper interface {\n\t// PolicyRefForAPI takes the name of an API, and returns the policy name\n\t// or the empty string if the API is not found\n\tPolicyRefForAPI(apiName string) string\n}\n```\nPolicyMapper is an interface for\n\n```go\ntype Resources interface {\n\t// ConfigtxValidator returns the configtx.Validator for the channel\n\tConfigtxValidator() configtx.Validator\n\n\t// PolicyManager returns the policies.Manager for the channel\n\tPolicyManager() policies.Manager\n\n\t// ChannelConfig returns the config.Channel for the chain\n\tChannelConfig() Channel\n\n\t// OrdererConfig returns the config.Orderer for the channel\n\t// and whether the Orderer config exists\n\tOrdererConfig() (Orderer, bool)\n\n\t// ConsortiumsConfig() returns the config.Consortiums for the channel\n\t// and whether the consortiums config exists\n\tConsortiumsConfig() (Consortiums, bool)\n\n\t// ApplicationConfig returns the configtxapplication.SharedConfig for the channel\n\t// and whether the Application config exists\n\tApplicationConfig() (Application, bool)\n\n\t// MSPManager returns the msp.MSPManager for the chain\n\tMSPManager() msp.MSPManager\n\n\t// ValidateNew should return an error if a new set of configuration resources is incompatible with the current one\n\tValidateNew(resources Resources) error\n}\n```\nResources is the common set of config resources for all channels Depending on whether chain is used at the orderer or at the peer, other config resources may be available\n\n```go\ntype StandardConfigValue struct {\n\t// contains filtered or unexported fields\n}\n```\nStandardConfigValue implements the ConfigValue interface.\n\n```go\nfunc ACLValues(acls map[string]string) *StandardConfigValue\n```\nACLsValues returns the config definition for an applications resources based ACL definitions. It is a value for the /Channel/Application/.\n\n```go\nfunc AnchorPeersValue(anchorPeers []*pb.AnchorPeer) *StandardConfigValue\n```\nAnchorPeersValue returns the config definition for an org's anchor peers. It is a value for the /Channel/Application/\\*.\n\n```go\nfunc BatchSizeValue(maxMessages, absoluteMaxBytes, preferredMaxBytes uint32) *StandardConfigValue\n```\nBatchSizeValue returns the config definition for the orderer batch size. It is a value for the /Channel/Orderer group.\n\n```go\nfunc BatchTimeoutValue(timeout string) *StandardConfigValue\n```\nBatchTimeoutValue returns the config definition for the orderer batch timeout. It is a value for the /Channel/Orderer group.\n\n```go\nfunc BlockDataHashingStructureValue() *StandardConfigValue\n```\nBlockDataHashingStructureValue returns the only currently valid block data hashing structure. It is a value for the /Channel group.\n\n```go\nfunc CapabilitiesValue(capabilities map[string]bool) *StandardConfigValue\n```\nCapabilitiesValue returns the config definition for a a set of capabilities. It is a value for the /Channel/Orderer, Channel/Application/, and /Channel groups.\n\n```go\nfunc ChannelCreationPolicyValue(policy *cb.Policy) *StandardConfigValue\n```\nChannelCreationPolicyValue returns the config definition for a consortium's channel creation policy It is a value for the /Channel/Consortiums/\\*/\\*.\n\n```go\nfunc ChannelRestrictionsValue(maxChannelCount uint64) *StandardConfigValue\n```\nChannelRestrictionsValue returns the config definition for the orderer channel restrictions. It is a value for the /Channel/Orderer group.\n\n```go\nfunc ConsensusTypeValue(consensusType string, consensusMetadata []byte) *StandardConfigValue\n```\nConsensusTypeValue returns the config definition for the orderer consensus type. It is a value for the /Channel/Orderer group.\n\n```go\nfunc ConsortiumValue(name string) *StandardConfigValue\n```\nConsortiumValue returns the config definition for the consortium name. It is a value for the channel group.\n\n```go\nfunc EndpointsValue(addresses []string) *StandardConfigValue\n```\nEndpointsValue returns the config definition for the orderer addresses at an org scoped level. It is a value for the /Channel/Orderer/\\\u003cOrgName\u003e group.\n\n```go\nfunc HashingAlgorithmValue() *StandardConfigValue\n```\nHashingAlgorithm returns the only currently valid hashing algorithm. It is a value for the /Channel group.\n\n```go\nfunc KafkaBrokersValue(brokers []string) *StandardConfigValue\n```\nKafkaBrokersValue returns the config definition for the addresses of the ordering service's Kafka brokers. It is a value for the /Channel/Orderer group.\n\n```go\nfunc MSPValue(mspDef *mspprotos.MSPConfig) *StandardConfigValue\n```\nMSPValue returns the config definition for an MSP. It is a value for the /Channel/Orderer/\\*, /Channel/Application/\\*, and /Channel/Consortiums/\\*/\\*/\\* groups.\n\n```go\nfunc OrdererAddressesValue(addresses []string) *StandardConfigValue\n```\nOrdererAddressesValue returns the a config definition for the orderer addresses. It is a value for the /Channel group.\n\n```go\nfunc (scv *StandardConfigValue) Key() string\n```\nKey is the key this value should be stored in the \\*cb.ConfigGroup.Values map.\n\n```go\nfunc (scv *StandardConfigValue) Value() proto.Message\n```\nValue is the message which should be marshaled to opaque bytes for the \\*cb.ConfigValue.value.\n\n```go\ntype StandardValues struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewStandardValues(protosStructs ...interface{}) (*StandardValues, error)\n```\nNewStandardValues accepts a structure which must contain only protobuf message types.  The structure may embed other (non-pointer) structures which satisfy the same condition.  NewStandard values will instantiate memory for all the proto messages and build a lookup map from structure field name to proto message instance This is a useful way to easily implement the Values interface\n\n```go\nfunc (sv *StandardValues) Deserialize(key string, value []byte) (proto.Message, error)\n```\nDeserialize looks up the backing Values proto of the given name, unmarshals the given bytes to populate the backing message structure, and returns a referenced to the retained deserialized message (or an error, either because the key did not exist, or there was an an error unmarshaling\n\n","path":"github.com/eric-erki/https-hyperledger.org/common/channelconfig","name":"channelconfig","synopsis":"","isRedistributable":true}
