{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.0.6","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Types\n\n```go\ntype Initializer interface {\n\tProposer\n\n\tResources\n}\n```\nInitializer is used as indirection between Manager and Handler to allow for single Handlers to handle multiple paths\n\n```go\ntype Manager interface {\n\tResources\n\n\t// Apply attempts to apply a configtx to become the new config\n\tApply(configEnv *cb.ConfigEnvelope) error\n\n\t// Validate attempts to apply a configtx to become the new config\n\tValidate(configEnv *cb.ConfigEnvelope) error\n\n\t// Validate attempts to validate a new configtx against the current config state\n\tProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)\n\n\t// ChainID retrieves the chain ID associated with this manager\n\tChainID() string\n\n\t// ConfigEnvelope returns the current config envelope\n\tConfigEnvelope() *cb.ConfigEnvelope\n\n\t// Sequence returns the current sequence number of the config\n\tSequence() uint64\n}\n```\nManager provides a mechanism to query and update config\n\n```go\ntype PolicyHandler interface {\n\tTransactional\n\n\tBeginConfig(tx interface{}, groups []string) ([]PolicyHandler, error)\n\n\tProposePolicy(tx interface{}, key string, path []string, policy *cb.ConfigPolicy) (proto.Message, error)\n}\n```\nPolicyHandler is used for config updates to policy\n\n```go\ntype Proposer interface {\n\t// ValueProposer return the root value proposer\n\tValueProposer() config.ValueProposer\n\n\t// PolicyProposer return the root policy proposer\n\tPolicyProposer() policies.Proposer\n}\n```\nProposer contains the references necesssary to appropriately unmarshal a cb.ConfigGroup\n\n```go\ntype Resources interface {\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() config.Channel\n\n\t// OrdererConfig returns the config.Orderer for the channel\n\t// and whether the Orderer config exists\n\tOrdererConfig() (config.Orderer, bool)\n\n\t// ConsortiumsConfig() returns the config.Consortiums for the channel\n\t// and whether the consortiums config exists\n\tConsortiumsConfig() (config.Consortiums, bool)\n\n\t// ApplicationConfig returns the configtxapplication.SharedConfig for the channel\n\t// and whether the Application config exists\n\tApplicationConfig() (config.Application, bool)\n\n\t// MSPManager returns the msp.MSPManager for the chain\n\tMSPManager() msp.MSPManager\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 Transactional interface {\n\t// RollbackConfig called when a config proposal is abandoned\n\tRollbackProposals(tx interface{})\n\n\t// PreCommit verifies that the transaction can be committed successfully\n\tPreCommit(tx interface{}) error\n\n\t// CommitConfig called when a config proposal is committed\n\tCommitProposals(tx interface{})\n}\n```\nTransactional is an interface which allows for an update to be proposed and rolled back\n\n","path":"github.com/eric-erki/https-hyperledger.org/common/configtx/api","name":"api","synopsis":"","isRedistributable":true}
