Documentation ¶
Index ¶
- type Channel
- type ChannelCapabilities
- type MockApplicationCapabilities
- type Orderer
- func (scm *Orderer) BatchSize() *ab.BatchSize
- func (scm *Orderer) BatchTimeout() time.Duration
- func (scm *Orderer) Capabilities() channelconfig.OrdererCapabilities
- func (scm *Orderer) ConsensusType() string
- func (scm *Orderer) KafkaBrokers() []string
- func (scm *Orderer) MaxChannelsCount() uint64
- func (scm *Orderer) Organizations() map[string]channelconfig.Org
- type OrdererCapabilities
- type Resources
- func (r *Resources) ApplicationConfig() (channelconfig.Application, bool)
- func (r *Resources) ChannelConfig() channelconfig.Channel
- func (r *Resources) ConfigtxManager() configtxapi.Manager
- func (r *Resources) ConsortiumsConfig() (channelconfig.Consortiums, bool)
- func (r *Resources) MSPManager() msp.MSPManager
- func (r *Resources) OrdererConfig() (channelconfig.Orderer, bool)
- func (r *Resources) PolicyManager() policies.Manager
- func (r *Resources) ValidateNew(res channelconfig.Resources) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { // HashingAlgorithmVal is returned as the result of HashingAlgorithm() if set HashingAlgorithmVal func([]byte) []byte // BlockDataHashingStructureWidthVal is returned as the result of BlockDataHashingStructureWidth() BlockDataHashingStructureWidthVal uint32 // OrdererAddressesVal is returned as the result of OrdererAddresses() OrdererAddressesVal []string // CapabilitiesVal is returned as the result of Capabilities() CapabilitiesVal channelconfig.ChannelCapabilities }
Channel is a mock implementation of config.Channel
func (*Channel) BlockDataHashingStructureWidth ¶
BlockDataHashingStructureWidth returns the BlockDataHashingStructureWidthVal
func (*Channel) Capabilities ¶ added in v1.1.0
func (scm *Channel) Capabilities() channelconfig.ChannelCapabilities
Capabilities returns CapabilitiesVal
func (*Channel) HashingAlgorithm ¶
HashingAlgorithm returns the HashingAlgorithmVal if set, otherwise a fake simple hash function
func (*Channel) OrdererAddresses ¶
OrdererAddresses returns the OrdererAddressesVal
type ChannelCapabilities ¶ added in v1.1.0
type ChannelCapabilities struct { // SupportedErr is returned by Supported() SupportedErr error // MSPVersionVal is returned by MSPVersion() MSPVersionVal msp.MSPVersion }
ChannelCapabilities mocks the channelconfig.ChannelCapabilities interface
func (*ChannelCapabilities) MSPVersion ¶ added in v1.1.0
func (cc *ChannelCapabilities) MSPVersion() msp.MSPVersion
MSPVersion returns MSPVersionVal
func (*ChannelCapabilities) Supported ¶ added in v1.1.0
func (cc *ChannelCapabilities) Supported() error
Supported returns SupportedErr
type MockApplicationCapabilities ¶ added in v1.1.0
func (*MockApplicationCapabilities) ForbidDuplicateTXIdInBlock ¶ added in v1.1.0
func (mac *MockApplicationCapabilities) ForbidDuplicateTXIdInBlock() bool
func (*MockApplicationCapabilities) Supported ¶ added in v1.1.0
func (mac *MockApplicationCapabilities) Supported() error
type Orderer ¶
type Orderer struct { // ConsensusTypeVal is returned as the result of ConsensusType() ConsensusTypeVal string // BatchSizeVal is returned as the result of BatchSize() BatchSizeVal *ab.BatchSize // BatchTimeoutVal is returned as the result of BatchTimeout() BatchTimeoutVal time.Duration // KafkaBrokersVal is returned as the result of KafkaBrokers() KafkaBrokersVal []string // MaxChannelsCountVal is returns as the result of MaxChannelsCount() MaxChannelsCountVal uint64 // OrganizationsVal is returned as the result of Organizations() OrganizationsVal map[string]channelconfig.Org // CapabilitiesVal is returned as the result of Capabilities() CapabilitiesVal channelconfig.OrdererCapabilities }
Orderer is a mock implementation of channelconfig.Orderer
func (*Orderer) BatchTimeout ¶
BatchTimeout returns the BatchTimeoutVal
func (*Orderer) Capabilities ¶ added in v1.1.0
func (scm *Orderer) Capabilities() channelconfig.OrdererCapabilities
Capabilities returns CapabilitiesVal
func (*Orderer) ConsensusType ¶
ConsensusType returns the ConsensusTypeVal
func (*Orderer) KafkaBrokers ¶
KafkaBrokers returns the KafkaBrokersVal
func (*Orderer) MaxChannelsCount ¶
MaxChannelsCount returns the MaxChannelsCountVal
func (*Orderer) Organizations ¶
func (scm *Orderer) Organizations() map[string]channelconfig.Org
Organizations returns OrganizationsVal
type OrdererCapabilities ¶ added in v1.1.0
type OrdererCapabilities struct { // SupportedErr is returned by Supported() SupportedErr error // SetChannelModPolicyDuringCreateVal is returned by SetChannelModPolicyDuringCreate() SetChannelModPolicyDuringCreateVal bool // ResubmissionVal is returned by Resubmission() ResubmissionVal bool }
OrdererCapabilities mocks the channelconfig.OrdererCapabilities interface
func (*OrdererCapabilities) Resubmission ¶ added in v1.1.0
func (oc *OrdererCapabilities) Resubmission() bool
Resubmission returns ResubmissionVal
func (*OrdererCapabilities) SetChannelModPolicyDuringCreate ¶
func (oc *OrdererCapabilities) SetChannelModPolicyDuringCreate() bool
SetChannelModPolicyDuringCreate returns SetChannelModPolicyDuringCreateVal
func (*OrdererCapabilities) Supported ¶ added in v1.1.0
func (oc *OrdererCapabilities) Supported() error
Supported returns SupportedErr
type Resources ¶ added in v1.1.0
type Resources struct { // ConfigtxManagerVal is returned as the result of ConfigtxManager ConfigtxManagerVal configtxapi.Manager // PolicyManagerVal is returned as the result of PolicyManager() PolicyManagerVal policies.Manager // ChannelConfigVal is returned as the result of ChannelConfig() ChannelConfigVal channelconfig.Channel // OrdererConfigVal is returned as the result of OrdererConfig() OrdererConfigVal channelconfig.Orderer // ApplicationConfigVal is returned as the result of ApplicationConfig() ApplicationConfigVal channelconfig.Application // ConsortiumsConfigVal is returned as the result of ConsortiumsConfig() ConsortiumsConfigVal channelconfig.Consortiums // MSPManagerVal is returned as the result of MSPManager() MSPManagerVal msp.MSPManager // ValidateNewErr is returned as the result of ValidateNew ValidateNewErr error }
func (*Resources) ApplicationConfig ¶ added in v1.1.0
func (r *Resources) ApplicationConfig() (channelconfig.Application, bool)
Returns the ApplicationConfigVal
func (*Resources) ChannelConfig ¶ added in v1.1.0
func (r *Resources) ChannelConfig() channelconfig.Channel
Returns the ChannelConfigVal
func (*Resources) ConfigtxManager ¶
func (r *Resources) ConfigtxManager() configtxapi.Manager
ConfigtxMangaer returns ConfigtxManagerVal
func (*Resources) ConsortiumsConfig ¶ added in v1.1.0
func (r *Resources) ConsortiumsConfig() (channelconfig.Consortiums, bool)
func (*Resources) MSPManager ¶ added in v1.1.0
func (r *Resources) MSPManager() msp.MSPManager
Returns the MSPManagerVal
func (*Resources) OrdererConfig ¶ added in v1.1.0
func (r *Resources) OrdererConfig() (channelconfig.Orderer, bool)
Returns the OrdererConfigVal
func (*Resources) PolicyManager ¶ added in v1.1.0
Returns the PolicyManagerVal
func (*Resources) ValidateNew ¶ added in v1.1.0
func (r *Resources) ValidateNew(res channelconfig.Resources) error
ValidateNew returns ValidateNewErr