config

package
v0.0.0-...-fbe82ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	//
	HashingAlgorithmVal func([]byte) []byte
	//
	BlockDataHashingStructureWidthVal uint32
	//
	OrdererAddressesVal []string
	//
	CapabilitiesVal channelconfig.ChannelCapabilities
}

func (*Channel) BlockDataHashingStructureWidth

func (scm *Channel) BlockDataHashingStructureWidth() uint32

func (*Channel) Capabilities

func (scm *Channel) Capabilities() channelconfig.ChannelCapabilities

func (*Channel) HashingAlgorithm

func (scm *Channel) HashingAlgorithm() func([]byte) []byte

func (*Channel) OrdererAddresses

func (scm *Channel) OrdererAddresses() []string

orderAddresses返回orderAddressesVal

type ChannelCapabilities

type ChannelCapabilities struct {
	//SUPPORTEDER由SUPPORTED()返回
	SupportedErr error

	//
	MSPVersionVal msp.MSPVersion
}

func (*ChannelCapabilities) MSPVersion

func (cc *ChannelCapabilities) MSPVersion() msp.MSPVersion

func (*ChannelCapabilities) Supported

func (cc *ChannelCapabilities) Supported() error

type MockApplication

type MockApplication struct {
	CapabilitiesRv channelconfig.ApplicationCapabilities
	Acls           map[string]string
}

func (*MockApplication) APIPolicyMapper

func (m *MockApplication) APIPolicyMapper() channelconfig.PolicyMapper

func (*MockApplication) Capabilities

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
	MetadataLifecycleRv          bool
	KeyLevelEndorsementRv        bool
	V1_3ValidationRv             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) 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

type Orderer

type Orderer struct {
	//consensistypeval作为consensistype()的结果返回
	ConsensusTypeVal string
	//
	ConsensusMetadataVal []byte
	//
	BatchSizeVal *ab.BatchSize
	//batchTimeoutVal作为batchTimeout()的结果返回
	BatchTimeoutVal time.Duration
	//
	KafkaBrokersVal []string
	//
	MaxChannelsCountVal uint64
	//OrganizationsVal作为Organizations()的结果返回
	OrganizationsVal map[string]channelconfig.Org
	//
	CapabilitiesVal channelconfig.OrdererCapabilities
}

func (*Orderer) BatchSize

func (o *Orderer) BatchSize() *ab.BatchSize

func (*Orderer) BatchTimeout

func (o *Orderer) BatchTimeout() time.Duration

func (*Orderer) Capabilities

func (o *Orderer) Capabilities() channelconfig.OrdererCapabilities

func (*Orderer) ConsensusMetadata

func (o *Orderer) ConsensusMetadata() []byte

func (*Orderer) ConsensusType

func (o *Orderer) ConsensusType() string

func (*Orderer) KafkaBrokers

func (o *Orderer) KafkaBrokers() []string

KafkAbrokers返回KafkAbrokersVal

func (*Orderer) MaxChannelsCount

func (o *Orderer) MaxChannelsCount() uint64

func (*Orderer) Organizations

func (o *Orderer) Organizations() map[string]channelconfig.Org

type OrdererCapabilities

type OrdererCapabilities struct {
	//SUPPORTEDER由SUPPORTED()返回
	SupportedErr error

	//
	PredictableChannelTemplateVal bool

	//通过重新提交()返回重新提交值
	ResubmissionVal bool

	//expirationval由expirationcheck()返回
	ExpirationVal bool
}

ordercapabilities模拟channelconfig.ordercapabilities接口

func (*OrdererCapabilities) ExpirationCheck

func (oc *OrdererCapabilities) ExpirationCheck() bool

ExpirationCheck指定订购方是否检查标识过期检查 验证消息时

func (*OrdererCapabilities) PredictableChannelTemplate

func (oc *OrdererCapabilities) PredictableChannelTemplate() bool

func (*OrdererCapabilities) Resubmission

func (oc *OrdererCapabilities) Resubmission() bool

func (*OrdererCapabilities) Supported

func (oc *OrdererCapabilities) Supported() error

支持的返回支持者

type Resources

type Resources struct {
	//
	ConfigtxValidatorVal configtx.Validator

	//
	PolicyManagerVal policies.Manager

	//
	ChannelConfigVal channelconfig.Channel

	//
	OrdererConfigVal channelconfig.Orderer

	//
	ApplicationConfigVal channelconfig.Application

	//
	ConsortiumsConfigVal channelconfig.Consortiums

	//mspmanagerval作为mspmanager()的结果返回
	MSPManagerVal msp.MSPManager

	//validatenewr作为validatenew的结果返回
	ValidateNewErr error
}

func (*Resources) ApplicationConfig

func (r *Resources) ApplicationConfig() (channelconfig.Application, bool)

func (*Resources) ChannelConfig

func (r *Resources) ChannelConfig() channelconfig.Channel

func (*Resources) ConfigtxValidator

func (r *Resources) ConfigtxValidator() configtx.Validator

func (*Resources) ConsortiumsConfig

func (r *Resources) ConsortiumsConfig() (channelconfig.Consortiums, bool)

func (*Resources) MSPManager

func (r *Resources) MSPManager() msp.MSPManager

func (*Resources) OrdererConfig

func (r *Resources) OrdererConfig() (channelconfig.Orderer, bool)

func (*Resources) PolicyManager

func (r *Resources) PolicyManager() policies.Manager

func (*Resources) ValidateNew

func (r *Resources) ValidateNew(res channelconfig.Resources) error

validateNew返回validatener

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL