Documentation ¶
Index ¶
- type ExecuteChaincodeResultProvider
- type MockCcProviderFactory
- type MockCcProviderImpl
- func (c *MockCcProviderImpl) Execute(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*peer.Response, *peer.ChaincodeEvent, error)
- func (c *MockCcProviderImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, ...) (*peer.Response, *peer.ChaincodeEvent, error)
- func (c *MockCcProviderImpl) Stop(ccci *ccprovider.ChaincodeContainerInfo) error
- type MockChaincodeDefinition
- type MockTxSim
- func (m *MockTxSim) DeletePrivateData(namespace, collection, key string) error
- func (m *MockTxSim) DeletePrivateDataMetadata(namespace, collection, key string) error
- func (m *MockTxSim) DeleteState(namespace string, key string) error
- func (m *MockTxSim) DeleteStateMetadata(namespace, key string) error
- func (m *MockTxSim) Done()
- func (m *MockTxSim) ExecuteQuery(namespace, query string) (commonledger.ResultsIterator, error)
- func (m *MockTxSim) ExecuteQueryOnPrivateData(namespace, collection, query string) (commonledger.ResultsIterator, error)
- func (m *MockTxSim) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error)
- func (m *MockTxSim) ExecuteUpdate(query string) error
- func (m *MockTxSim) GetPrivateData(namespace, collection, key string) ([]byte, error)
- func (m *MockTxSim) GetPrivateDataHash(namespace, collection, key string) ([]byte, error)
- func (m *MockTxSim) GetPrivateDataMetadata(namespace, collection, key string) (map[string][]byte, error)
- func (m *MockTxSim) GetPrivateDataMetadataByHash(namespace, collection string, keyhash []byte) (map[string][]byte, error)
- func (m *MockTxSim) GetPrivateDataMultipleKeys(namespace, collection string, keys []string) ([][]byte, error)
- func (m *MockTxSim) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error)
- func (m *MockTxSim) GetState(namespace string, key string) ([]byte, error)
- func (m *MockTxSim) GetStateMetadata(namespace, key string) (map[string][]byte, error)
- func (m *MockTxSim) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error)
- func (m *MockTxSim) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)
- func (m *MockTxSim) GetStateRangeScanIteratorWithMetadata(namespace string, startKey, endKey string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error)
- func (m *MockTxSim) GetTxSimulationResults() (*ledger.TxSimulationResults, error)
- func (m *MockTxSim) SetPrivateData(namespace, collection, key string, value []byte) error
- func (m *MockTxSim) SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error
- func (m *MockTxSim) SetPrivateDataMultipleKeys(namespace, collection string, kvs map[string][]byte) error
- func (m *MockTxSim) SetState(namespace string, key string, value []byte) error
- func (m *MockTxSim) SetStateMetadata(namespace, key string, metadata map[string][]byte) error
- func (m *MockTxSim) SetStateMultipleKeys(namespace string, kvs map[string][]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecuteChaincodeResultProvider ¶ added in v1.0.1
type ExecuteChaincodeResultProvider interface {
ExecuteChaincodeResult() (*peer.Response, *peer.ChaincodeEvent, error)
}
type MockCcProviderFactory ¶
type MockCcProviderFactory struct {
ExecuteResultProvider ExecuteChaincodeResultProvider
}
MockCcProviderFactory is a factory that returns mock implementations of the ccprovider.ChaincodeProvider interface
func (*MockCcProviderFactory) NewChaincodeProvider ¶
func (c *MockCcProviderFactory) NewChaincodeProvider() ccprovider.ChaincodeProvider
NewChaincodeProvider returns a mock implementation of the ccprovider.ChaincodeProvider interface
type MockCcProviderImpl ¶ added in v1.1.0
type MockCcProviderImpl struct { ExecuteResultProvider ExecuteChaincodeResultProvider ExecuteChaincodeResponse *peer.Response }
mockCcProviderImpl is a mock implementation of the chaincode provider
func (*MockCcProviderImpl) Execute ¶ added in v1.1.0
func (c *MockCcProviderImpl) Execute(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, spec *peer.ChaincodeInput) (*peer.Response, *peer.ChaincodeEvent, error)
Execute executes the chaincode given context and spec invocation
func (*MockCcProviderImpl) ExecuteLegacyInit ¶ added in v1.3.0
func (c *MockCcProviderImpl) ExecuteLegacyInit(txParams *ccprovider.TransactionParams, cccid *ccprovider.CCContext, spec *peer.ChaincodeDeploymentSpec) (*peer.Response, *peer.ChaincodeEvent, error)
ExecuteInit executes the chaincode given context and spec deploy
func (*MockCcProviderImpl) Stop ¶ added in v1.1.0
func (c *MockCcProviderImpl) Stop(ccci *ccprovider.ChaincodeContainerInfo) error
Stop stops the chaincode given context and deployment spec
type MockChaincodeDefinition ¶ added in v1.2.0
type MockChaincodeDefinition struct { NameRv string VersionRv string EndorsementStr string ValidationStr string ValidationBytes []byte HashRv []byte }
func (*MockChaincodeDefinition) CCName ¶ added in v1.2.0
func (m *MockChaincodeDefinition) CCName() string
func (*MockChaincodeDefinition) CCVersion ¶ added in v1.2.0
func (m *MockChaincodeDefinition) CCVersion() string
func (*MockChaincodeDefinition) Endorsement ¶ added in v1.2.0
func (m *MockChaincodeDefinition) Endorsement() string
func (*MockChaincodeDefinition) Hash ¶ added in v1.2.0
func (m *MockChaincodeDefinition) Hash() []byte
func (*MockChaincodeDefinition) Validation ¶ added in v1.2.0
func (m *MockChaincodeDefinition) Validation() (string, []byte)
type MockTxSim ¶ added in v1.1.0
type MockTxSim struct {
GetTxSimulationResultsRv *ledger.TxSimulationResults
}
func (*MockTxSim) DeletePrivateData ¶ added in v1.1.0
func (*MockTxSim) DeletePrivateDataMetadata ¶ added in v1.2.0
func (*MockTxSim) DeleteState ¶ added in v1.1.0
func (*MockTxSim) DeleteStateMetadata ¶ added in v1.2.0
func (*MockTxSim) ExecuteQuery ¶ added in v1.1.0
func (m *MockTxSim) ExecuteQuery(namespace, query string) (commonledger.ResultsIterator, error)
func (*MockTxSim) ExecuteQueryOnPrivateData ¶ added in v1.1.0
func (m *MockTxSim) ExecuteQueryOnPrivateData(namespace, collection, query string) (commonledger.ResultsIterator, error)
func (*MockTxSim) ExecuteQueryWithMetadata ¶ added in v1.3.0
func (*MockTxSim) ExecuteUpdate ¶ added in v1.1.0
func (*MockTxSim) GetPrivateData ¶ added in v1.1.0
func (*MockTxSim) GetPrivateDataHash ¶ added in v1.4.2
func (*MockTxSim) GetPrivateDataMetadata ¶ added in v1.2.0
func (*MockTxSim) GetPrivateDataMetadataByHash ¶ added in v1.3.0
func (*MockTxSim) GetPrivateDataMultipleKeys ¶ added in v1.1.0
func (*MockTxSim) GetPrivateDataRangeScanIterator ¶ added in v1.1.0
func (m *MockTxSim) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error)
func (*MockTxSim) GetStateMetadata ¶ added in v1.2.0
func (*MockTxSim) GetStateMultipleKeys ¶ added in v1.1.0
func (*MockTxSim) GetStateRangeScanIterator ¶ added in v1.1.0
func (m *MockTxSim) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)
func (*MockTxSim) GetStateRangeScanIteratorWithMetadata ¶ added in v1.3.0
func (*MockTxSim) GetTxSimulationResults ¶ added in v1.1.0
func (m *MockTxSim) GetTxSimulationResults() (*ledger.TxSimulationResults, error)
func (*MockTxSim) SetPrivateData ¶ added in v1.1.0
func (*MockTxSim) SetPrivateDataMetadata ¶ added in v1.2.0
func (*MockTxSim) SetPrivateDataMultipleKeys ¶ added in v1.1.0
func (*MockTxSim) SetStateMetadata ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.