Documentation ¶
Index ¶
- type Channel
- type ChannelCapabilities
- type MockApplication
- type MockApplicationCapabilities
- func (mac *MockApplicationCapabilities) ACLs() bool
- func (mac *MockApplicationCapabilities) CollectionUpgrade() bool
- func (mac *MockApplicationCapabilities) FabToken() bool
- func (mac *MockApplicationCapabilities) ForbidDuplicateTXIdInBlock() bool
- func (mac *MockApplicationCapabilities) KeyLevelEndorsement() bool
- func (mac *MockApplicationCapabilities) LifecycleV20() bool
- func (mac *MockApplicationCapabilities) MetadataLifecycle() bool
- func (mac *MockApplicationCapabilities) PrivateChannelData() bool
- func (mac *MockApplicationCapabilities) Supported() error
- func (mac *MockApplicationCapabilities) V1_1Validation() bool
- func (mac *MockApplicationCapabilities) V1_2Validation() bool
- func (mac *MockApplicationCapabilities) V1_3Validation() bool
- func (mac *MockApplicationCapabilities) V2_0Validation() bool
- type Orderer
- func (o *Orderer) BatchSize() *ab.BatchSize
- func (o *Orderer) BatchTimeout() time.Duration
- func (o *Orderer) Capabilities() channelconfig.OrdererCapabilities
- func (o *Orderer) ConsensusMetadata() []byte
- func (o *Orderer) ConsensusMigrationContext() uint64
- func (o *Orderer) ConsensusMigrationState() ab.ConsensusType_MigrationState
- func (o *Orderer) ConsensusType() string
- func (o *Orderer) KafkaBrokers() []string
- func (o *Orderer) MaxChannelsCount() uint64
- func (o *Orderer) Organizations() map[string]channelconfig.OrdererOrg
- type OrdererCapabilities
- func (oc *OrdererCapabilities) ExpirationCheck() bool
- func (oc *OrdererCapabilities) Kafka2RaftMigration() bool
- func (oc *OrdererCapabilities) PredictableChannelTemplate() bool
- func (oc *OrdererCapabilities) Resubmission() bool
- func (oc *OrdererCapabilities) Supported() error
- func (oc *OrdererCapabilities) UseChannelCreationPolicyAsAdmins() bool
- type Resources
- func (r *Resources) ApplicationConfig() (channelconfig.Application, bool)
- func (r *Resources) ChannelConfig() channelconfig.Channel
- func (r *Resources) ConfigtxValidator() configtx.Validator
- 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 ¶
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 ¶
type ChannelCapabilities struct { // SupportedErr is returned by Supported() SupportedErr error // MSPVersionVal is returned by MSPVersion() MSPVersionVal msp.MSPVersion ConsensusTypeMigrationVal bool }
ChannelCapabilities mocks the channelconfig.ChannelCapabilities interface
func (*ChannelCapabilities) ConsensusTypeMigration ¶
func (cc *ChannelCapabilities) ConsensusTypeMigration() bool
ConsensusTypeMigration returns ConsensusTypeMigrationVal
func (*ChannelCapabilities) MSPVersion ¶
func (cc *ChannelCapabilities) MSPVersion() msp.MSPVersion
MSPVersion returns MSPVersionVal
func (*ChannelCapabilities) Supported ¶
func (cc *ChannelCapabilities) Supported() error
Supported returns SupportedErr
type MockApplication ¶
type MockApplication struct { CapabilitiesRv channelconfig.ApplicationCapabilities Acls map[string]string }
func (*MockApplication) APIPolicyMapper ¶
func (m *MockApplication) APIPolicyMapper() channelconfig.PolicyMapper
Returns the mock which itself is a provider
func (*MockApplication) Capabilities ¶
func (m *MockApplication) Capabilities() channelconfig.ApplicationCapabilities
func (*MockApplication) Organizations ¶
func (m *MockApplication) Organizations() map[string]channelconfig.ApplicationOrg
func (*MockApplication) PolicyRefForAPI ¶
func (m *MockApplication) PolicyRefForAPI(apiName string) string
type MockApplicationCapabilities ¶
type MockApplicationCapabilities struct { SupportedRv error ForbidDuplicateTXIdInBlockRv bool ACLsRv bool PrivateChannelDataRv bool CollectionUpgradeRv bool V1_1ValidationRv bool V1_2ValidationRv bool LifecycleV20Rv bool KeyLevelEndorsementRv bool V1_3ValidationRv bool V2_0ValidationRv bool FabTokenRv bool }
func (*MockApplicationCapabilities) ACLs ¶
func (mac *MockApplicationCapabilities) ACLs() bool
func (*MockApplicationCapabilities) CollectionUpgrade ¶
func (mac *MockApplicationCapabilities) CollectionUpgrade() bool
func (*MockApplicationCapabilities) FabToken ¶
func (mac *MockApplicationCapabilities) FabToken() bool
func (*MockApplicationCapabilities) ForbidDuplicateTXIdInBlock ¶
func (mac *MockApplicationCapabilities) ForbidDuplicateTXIdInBlock() bool
func (*MockApplicationCapabilities) KeyLevelEndorsement ¶
func (mac *MockApplicationCapabilities) KeyLevelEndorsement() bool
func (*MockApplicationCapabilities) LifecycleV20 ¶
func (mac *MockApplicationCapabilities) LifecycleV20() bool
func (*MockApplicationCapabilities) MetadataLifecycle ¶
func (mac *MockApplicationCapabilities) MetadataLifecycle() bool
func (*MockApplicationCapabilities) PrivateChannelData ¶
func (mac *MockApplicationCapabilities) PrivateChannelData() bool
func (*MockApplicationCapabilities) Supported ¶
func (mac *MockApplicationCapabilities) Supported() error
func (*MockApplicationCapabilities) V1_1Validation ¶
func (mac *MockApplicationCapabilities) V1_1Validation() bool
func (*MockApplicationCapabilities) V1_2Validation ¶
func (mac *MockApplicationCapabilities) V1_2Validation() bool
func (*MockApplicationCapabilities) V1_3Validation ¶
func (mac *MockApplicationCapabilities) V1_3Validation() bool
func (*MockApplicationCapabilities) V2_0Validation ¶
func (mac *MockApplicationCapabilities) V2_0Validation() bool
type Orderer ¶
type Orderer struct { // ConsensusTypeVal is returned as the result of ConsensusType() ConsensusTypeVal string // ConsensusMetadataVal is returned as the result of ConsensusMetadata() ConsensusMetadataVal []byte ConsensusTypeMigrationStateVal ab.ConsensusType_MigrationState ConsensusTypeMigrationContextVal uint64 // 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.OrdererOrg // 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 ¶
func (o *Orderer) Capabilities() channelconfig.OrdererCapabilities
Capabilities returns CapabilitiesVal
func (*Orderer) ConsensusMetadata ¶
ConsensusMetadata returns the ConsensusMetadataVal
func (*Orderer) ConsensusMigrationContext ¶
ConsensusMigrationContext returns the ConsensusTypeMigrationContextVal
func (*Orderer) ConsensusMigrationState ¶
func (o *Orderer) ConsensusMigrationState() ab.ConsensusType_MigrationState
ConsensusMigrationState returns the ConsensusTypeMigrationStateVal
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 (o *Orderer) Organizations() map[string]channelconfig.OrdererOrg
Organizations returns OrganizationsVal
type OrdererCapabilities ¶
type OrdererCapabilities struct { // SupportedErr is returned by Supported() SupportedErr error // PredictableChannelTemplateVal is returned by PredictableChannelTemplate() PredictableChannelTemplateVal bool // ResubmissionVal is returned by Resubmission() ResubmissionVal bool // ExpirationVal is returned by ExpirationCheck() ExpirationVal bool Kafka2RaftMigVal bool UseChannelCreationPolicyAsAdminsVal bool }
OrdererCapabilities mocks the channelconfig.OrdererCapabilities interface
func (*OrdererCapabilities) ExpirationCheck ¶
func (oc *OrdererCapabilities) ExpirationCheck() bool
ExpirationCheck specifies whether the orderer checks for identity expiration checks when validating messages
func (*OrdererCapabilities) Kafka2RaftMigration ¶
func (oc *OrdererCapabilities) Kafka2RaftMigration() bool
Kafka2RaftMigration checks whether the orderer permits a kafka to raft migration.
func (*OrdererCapabilities) PredictableChannelTemplate ¶
func (oc *OrdererCapabilities) PredictableChannelTemplate() bool
PredictableChannelTemplate returns PredictableChannelTemplateVal
func (*OrdererCapabilities) Resubmission ¶
func (oc *OrdererCapabilities) Resubmission() bool
Resubmission returns ResubmissionVal
func (*OrdererCapabilities) Supported ¶
func (oc *OrdererCapabilities) Supported() error
Supported returns SupportedErr
func (*OrdererCapabilities) UseChannelCreationPolicyAsAdmins ¶
func (oc *OrdererCapabilities) UseChannelCreationPolicyAsAdmins() bool
type Resources ¶
type Resources struct { // ConfigtxValidatorVal is returned as the result of ConfigtxValidator ConfigtxValidatorVal configtx.Validator // 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 ¶
func (r *Resources) ApplicationConfig() (channelconfig.Application, bool)
Returns the ApplicationConfigVal
func (*Resources) ChannelConfig ¶
func (r *Resources) ChannelConfig() channelconfig.Channel
Returns the ChannelConfigVal
func (*Resources) ConfigtxValidator ¶
ConfigtxMangaer returns ConfigtxValidatorVal
func (*Resources) ConsortiumsConfig ¶
func (r *Resources) ConsortiumsConfig() (channelconfig.Consortiums, bool)
func (*Resources) MSPManager ¶
func (r *Resources) MSPManager() msp.MSPManager
Returns the MSPManagerVal
func (*Resources) OrdererConfig ¶
func (r *Resources) OrdererConfig() (channelconfig.Orderer, bool)
Returns the OrdererConfigVal
func (*Resources) PolicyManager ¶
Returns the PolicyManagerVal
func (*Resources) ValidateNew ¶
func (r *Resources) ValidateNew(res channelconfig.Resources) error
ValidateNew returns ValidateNewErr