Documentation ¶
Index ¶
- Constants
- func ComputeDeltaSet(readSet, writeSet map[string]comparable) map[string]comparable
- func MakeChainCreationTransaction(channelID string, consortium string, signer msp.SigningIdentity, ...) (*cb.Envelope, error)
- func MapConfig(channelGroup *cb.ConfigGroup) (map[string]comparable, error)
- func NewInitializer() api.Initializer
- func NewManagerImpl(envConfig *cb.Envelope, initializer api.Initializer, ...) (api.Manager, error)
- func UnmarshalConfig(data []byte) (*cb.Config, error)
- func UnmarshalConfigEnvelope(data []byte) (*cb.ConfigEnvelope, error)
- func UnmarshalConfigEnvelopeOrPanic(data []byte) *cb.ConfigEnvelope
- func UnmarshalConfigOrPanic(data []byte) *cb.Config
- func UnmarshalConfigUpdate(data []byte) (*cb.ConfigUpdate, error)
- func UnmarshalConfigUpdateEnvelope(data []byte) (*cb.ConfigUpdateEnvelope, error)
- func UnmarshalConfigUpdateEnvelopeOrPanic(data []byte) *cb.ConfigUpdateEnvelope
- func UnmarshalConfigUpdateOrPanic(data []byte) *cb.ConfigUpdate
- type ConfigResult
- type Template
Constants ¶
const ( RootGroupKey = "Channel" GroupPrefix = "[Groups] " ValuePrefix = "[Values] " PolicyPrefix = "[Policy] " // The plurarility doesn't match, but, it makes the logs much easier being the same length as "Groups" and "Values" PathSeparator = "/" )
const ( // CreationPolicyKey defines the config key used in the channel // config, under which the creation policy is defined. CreationPolicyKey = "CreationPolicy" )
Variables ¶
This section is empty.
Functions ¶
func ComputeDeltaSet ¶
func MakeChainCreationTransaction ¶
func MakeChainCreationTransaction(channelID string, consortium string, signer msp.SigningIdentity, orgs ...string) (*cb.Envelope, error)
MakeChainCreationTransaction is a handy utility function for creating new chain transactions using the underlying Template framework
func MapConfig ¶
func MapConfig(channelGroup *cb.ConfigGroup) (map[string]comparable, error)
MapConfig is intended to be called outside this file it takes a ConfigGroup and generates a map of fqPath to comparables (or error on invalid keys)
func NewInitializer ¶
func NewInitializer() api.Initializer
NewInitializer creates a chain initializer for the basic set of common chain resources
func NewManagerImpl ¶
func UnmarshalConfig ¶
UnmarshalConfig attempts to unmarshal bytes to a *cb.Config
func UnmarshalConfigEnvelope ¶
func UnmarshalConfigEnvelope(data []byte) (*cb.ConfigEnvelope, error)
UnmarshalConfigEnvelope attempts to unmarshal bytes to a *cb.ConfigEnvelope
func UnmarshalConfigEnvelopeOrPanic ¶
func UnmarshalConfigEnvelopeOrPanic(data []byte) *cb.ConfigEnvelope
UnmarshalConfigEnvelope attempts to unmarshal bytes to a *cb.ConfigEnvelope or panics
func UnmarshalConfigOrPanic ¶
UnmarshalConfig attempts to unmarshal bytes to a *cb.Config
func UnmarshalConfigUpdate ¶
func UnmarshalConfigUpdate(data []byte) (*cb.ConfigUpdate, error)
UnmarshalConfigUpdate attempts to unmarshal bytes to a *cb.ConfigUpdate
func UnmarshalConfigUpdateEnvelope ¶
func UnmarshalConfigUpdateEnvelope(data []byte) (*cb.ConfigUpdateEnvelope, error)
UnmarshalConfigUpdateEnvelope attempts to unmarshal bytes to a *cb.ConfigUpdate
func UnmarshalConfigUpdateEnvelopeOrPanic ¶
func UnmarshalConfigUpdateEnvelopeOrPanic(data []byte) *cb.ConfigUpdateEnvelope
UnmarshalConfigUpdateEnvelope attempts to unmarshal bytes to a *cb.ConfigUpdateEnvelope or panics
func UnmarshalConfigUpdateOrPanic ¶
func UnmarshalConfigUpdateOrPanic(data []byte) *cb.ConfigUpdate
UnmarshalConfigUpdate attempts to unmarshal bytes to a *cb.ConfigUpdate or panics
Types ¶
type ConfigResult ¶
type ConfigResult interface {
JSON() string
}
func NewConfigResult ¶
func NewConfigResult(config *cb.ConfigGroup, proposer api.Proposer) (ConfigResult, error)
type Template ¶
type Template interface { // Envelope returns a ConfigUpdateEnvelope for the given chainID Envelope(chainID string) (*cb.ConfigUpdateEnvelope, error) }
Template can be used to facilitate creation of config transactions
func NewChainCreationTemplate ¶
NewChainCreationTemplate takes a consortium name and a Template to produce a Template which outputs an appropriately constructed list of ConfigUpdateEnvelopes.
func NewCompositeTemplate ¶
NewCompositeTemplate creates a Template using the source Templates
func NewModPolicySettingTemplate ¶
NewModPolicySettingTemplate wraps another template and sets the ModPolicy of every ConfigGroup/ConfigValue/ConfigPolicy without a modPolicy to modPolicy
func NewSimpleTemplate ¶
func NewSimpleTemplate(configGroups ...*cb.ConfigGroup) Template
NewSimpleTemplate creates a Template using the supplied ConfigGroups