{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.4.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package configtx\n\n## Functions\n\n```go\nfunc UnmarshalConfig(data []byte) (*cb.Config, error)\n```\nUnmarshalConfig attempts to unmarshal bytes to a \\*cb.Config\n\n```go\nfunc UnmarshalConfigEnvelope(data []byte) (*cb.ConfigEnvelope, error)\n```\nUnmarshalConfigEnvelope attempts to unmarshal bytes to a \\*cb.ConfigEnvelope\n\n```go\nfunc UnmarshalConfigEnvelopeOrPanic(data []byte) *cb.ConfigEnvelope\n```\nUnmarshalConfigEnvelopeOrPanic attempts to unmarshal bytes to a \\*cb.ConfigEnvelope or panics on error\n\n```go\nfunc UnmarshalConfigOrPanic(data []byte) *cb.Config\n```\nUnmarshalConfigOrPanic attempts to unmarshal bytes to a \\*cb.Config or panics on error\n\n```go\nfunc UnmarshalConfigUpdate(data []byte) (*cb.ConfigUpdate, error)\n```\nUnmarshalConfigUpdate attempts to unmarshal bytes to a \\*cb.ConfigUpdate\n\n```go\nfunc UnmarshalConfigUpdateEnvelope(data []byte) (*cb.ConfigUpdateEnvelope, error)\n```\nUnmarshalConfigUpdateEnvelope attempts to unmarshal bytes to a \\*cb.ConfigUpdate\n\n```go\nfunc UnmarshalConfigUpdateEnvelopeOrPanic(data []byte) *cb.ConfigUpdateEnvelope\n```\nUnmarshalConfigUpdateEnvelopeOrPanic attempts to unmarshal bytes to a \\*cb.ConfigUpdateEnvelope or panics on error\n\n```go\nfunc UnmarshalConfigUpdateFromPayload(payload *cb.Payload) (*cb.ConfigUpdate, error)\n```\nUnmarshalConfigUpdateFromPayload unmarshals configuration update from given payload\n\n```go\nfunc UnmarshalConfigUpdateOrPanic(data []byte) *cb.ConfigUpdate\n```\nUnmarshalConfigUpdateOrPanic attempts to unmarshal bytes to a \\*cb.ConfigUpdate or panics on error\n\n## Types\n\n```go\ntype Validator interface {\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// ConfigProto returns the current config as a proto\n\tConfigProto() *cb.Config\n\n\t// Sequence returns the current sequence number of the config\n\tSequence() uint64\n}\n```\nValidator provides a mechanism to propose config updates, see the config update results and validate the results of a config update.\n\n```go\ntype ValidatorImpl struct {\n\t// contains filtered or unexported fields\n}\n```\nValidatorImpl implements the Validator interface\n\n```go\nfunc NewValidatorImpl(channelID string, config *cb.Config, namespace string, pm policies.Manager) (*ValidatorImpl, error)\n```\nNewValidatorImpl constructs a new implementation of the Validator interface.\n\n```go\nfunc (vi *ValidatorImpl) ChainID() string\n```\nChainID retrieves the chain ID associated with this manager\n\n```go\nfunc (vi *ValidatorImpl) ConfigProto() *cb.Config\n```\nConfigProto returns the config proto which initialized this Validator\n\n```go\nfunc (vi *ValidatorImpl) ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error)\n```\nProposeConfigUpdate takes in an Envelope of type CONFIG\\_UPDATE and produces a ConfigEnvelope to be used as the Envelope Payload Data of a CONFIG message\n\n```go\nfunc (vi *ValidatorImpl) Sequence() uint64\n```\nSequence returns the sequence number of the config\n\n```go\nfunc (vi *ValidatorImpl) Validate(configEnv *cb.ConfigEnvelope) error\n```\nValidate simulates applying a ConfigEnvelope to become the new config\n\n","path":"github.com/eric-erki/https-hyperledger.org/common/configtx","name":"configtx","synopsis":"","isRedistributable":true}
