ccprovider

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecuteChaincodeResultProvider

type ExecuteChaincodeResultProvider interface {
	ExecuteChaincodeResult() (*peer.Response, *peer.ChaincodeEvent, error)
}

type MockCcProviderFactory

type MockCcProviderFactory struct {
	ExecuteResultProvider ExecuteChaincodeResultProvider
}

MockcProviderFactory是返回的工厂 ccprovider.chaincodeprovider接口的模拟实现

func (*MockCcProviderFactory) NewChaincodeProvider

func (c *MockCcProviderFactory) NewChaincodeProvider() ccprovider.ChaincodeProvider

NewChaincodeProvider返回ccProvider.ChaincodeProvider接口的模拟实现

type MockCcProviderImpl

type MockCcProviderImpl struct {
	ExecuteResultProvider    ExecuteChaincodeResultProvider
	ExecuteChaincodeResponse *peer.Response
}

mockccproviderimpl是chaincode提供程序的模拟实现

func (*MockCcProviderImpl) Execute

执行执行给定上下文和规范调用的链代码

func (*MockCcProviderImpl) ExecuteLegacyInit

ExecuteInit执行给定上下文和规范部署的链代码

func (*MockCcProviderImpl) Stop

stop停止给定上下文和部署规范的链代码

type MockChaincodeDefinition

type MockChaincodeDefinition struct {
	NameRv          string
	VersionRv       string
	EndorsementStr  string
	ValidationStr   string
	ValidationBytes []byte
	HashRv          []byte
}

func (*MockChaincodeDefinition) CCName

func (m *MockChaincodeDefinition) CCName() string

func (*MockChaincodeDefinition) CCVersion

func (m *MockChaincodeDefinition) CCVersion() string

func (*MockChaincodeDefinition) Endorsement

func (m *MockChaincodeDefinition) Endorsement() string

func (*MockChaincodeDefinition) Hash

func (m *MockChaincodeDefinition) Hash() []byte

func (*MockChaincodeDefinition) Validation

func (m *MockChaincodeDefinition) Validation() (string, []byte)

type MockTxSim

type MockTxSim struct {
	GetTxSimulationResultsRv *ledger.TxSimulationResults
}

func (*MockTxSim) DeletePrivateData

func (m *MockTxSim) DeletePrivateData(namespace, collection, key string) error

func (*MockTxSim) DeletePrivateDataMetadata

func (m *MockTxSim) DeletePrivateDataMetadata(namespace, collection, key string) error

func (*MockTxSim) DeleteState

func (m *MockTxSim) DeleteState(namespace string, key string) error

func (*MockTxSim) DeleteStateMetadata

func (m *MockTxSim) DeleteStateMetadata(namespace, key string) error

func (*MockTxSim) Done

func (m *MockTxSim) Done()

func (*MockTxSim) ExecuteQuery

func (m *MockTxSim) ExecuteQuery(namespace, query string) (commonledger.ResultsIterator, error)

func (*MockTxSim) ExecuteQueryOnPrivateData

func (m *MockTxSim) ExecuteQueryOnPrivateData(namespace, collection, query string) (commonledger.ResultsIterator, error)

func (*MockTxSim) ExecuteQueryWithMetadata

func (m *MockTxSim) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error)

func (*MockTxSim) ExecuteUpdate

func (m *MockTxSim) ExecuteUpdate(query string) error

func (*MockTxSim) GetPrivateData

func (m *MockTxSim) GetPrivateData(namespace, collection, key string) ([]byte, error)

func (*MockTxSim) GetPrivateDataMetadata

func (m *MockTxSim) GetPrivateDataMetadata(namespace, collection, key string) (map[string][]byte, error)

func (*MockTxSim) GetPrivateDataMetadataByHash

func (m *MockTxSim) GetPrivateDataMetadataByHash(namespace, collection string, keyhash []byte) (map[string][]byte, error)

func (*MockTxSim) GetPrivateDataMultipleKeys

func (m *MockTxSim) GetPrivateDataMultipleKeys(namespace, collection string, keys []string) ([][]byte, error)

func (*MockTxSim) GetPrivateDataRangeScanIterator

func (m *MockTxSim) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error)

func (*MockTxSim) GetState

func (m *MockTxSim) GetState(namespace string, key string) ([]byte, error)

func (*MockTxSim) GetStateMetadata

func (m *MockTxSim) GetStateMetadata(namespace, key string) (map[string][]byte, error)

func (*MockTxSim) GetStateMultipleKeys

func (m *MockTxSim) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error)

func (*MockTxSim) GetStateRangeScanIterator

func (m *MockTxSim) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)

func (*MockTxSim) GetStateRangeScanIteratorWithMetadata

func (m *MockTxSim) GetStateRangeScanIteratorWithMetadata(namespace string, startKey, endKey string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error)

func (*MockTxSim) GetTxSimulationResults

func (m *MockTxSim) GetTxSimulationResults() (*ledger.TxSimulationResults, error)

func (*MockTxSim) SetPrivateData

func (m *MockTxSim) SetPrivateData(namespace, collection, key string, value []byte) error

func (*MockTxSim) SetPrivateDataMetadata

func (m *MockTxSim) SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error

func (*MockTxSim) SetPrivateDataMultipleKeys

func (m *MockTxSim) SetPrivateDataMultipleKeys(namespace, collection string, kvs map[string][]byte) error

func (*MockTxSim) SetState

func (m *MockTxSim) SetState(namespace string, key string, value []byte) error

func (*MockTxSim) SetStateMetadata

func (m *MockTxSim) SetStateMetadata(namespace, key string, metadata map[string][]byte) error

func (*MockTxSim) SetStateMultipleKeys

func (m *MockTxSim) SetStateMultipleKeys(namespace string, kvs map[string][]byte) error

Jump to

Keyboard shortcuts

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