fabric: github.com/hyperledger/fabric/core/mocks/ccprovider Index | Files

package ccprovider

import "github.com/hyperledger/fabric/core/mocks/ccprovider"


Package Files


type ExecuteChaincodeResultProvider Uses

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

type MockCcProviderFactory Uses

type MockCcProviderFactory struct {
    ExecuteResultProvider ExecuteChaincodeResultProvider

MockCcProviderFactory is a factory that returns mock implementations of the ccprovider.ChaincodeProvider interface

func (*MockCcProviderFactory) NewChaincodeProvider Uses

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

NewChaincodeProvider returns a mock implementation of the ccprovider.ChaincodeProvider interface

type MockCcProviderImpl Uses

type MockCcProviderImpl struct {
    ExecuteResultProvider    ExecuteChaincodeResultProvider
    ExecuteChaincodeResponse *peer.Response

mockCcProviderImpl is a mock implementation of the chaincode provider

func (*MockCcProviderImpl) Execute Uses

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 Uses

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 Uses

func (c *MockCcProviderImpl) Stop(ccci *ccprovider.ChaincodeContainerInfo) error

Stop stops the chaincode given context and deployment spec

type MockChaincodeDefinition Uses

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

func (*MockChaincodeDefinition) CCName Uses

func (m *MockChaincodeDefinition) CCName() string

func (*MockChaincodeDefinition) CCVersion Uses

func (m *MockChaincodeDefinition) CCVersion() string

func (*MockChaincodeDefinition) Endorsement Uses

func (m *MockChaincodeDefinition) Endorsement() string

func (*MockChaincodeDefinition) Hash Uses

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

func (*MockChaincodeDefinition) Validation Uses

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

type MockTxSim Uses

type MockTxSim struct {
    GetTxSimulationResultsRv *ledger.TxSimulationResults

func (*MockTxSim) DeletePrivateData Uses

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

func (*MockTxSim) DeletePrivateDataMetadata Uses

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

func (*MockTxSim) DeleteState Uses

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

func (*MockTxSim) DeleteStateMetadata Uses

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

func (*MockTxSim) Done Uses

func (m *MockTxSim) Done()

func (*MockTxSim) ExecuteQuery Uses

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

func (*MockTxSim) ExecuteQueryOnPrivateData Uses

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

func (*MockTxSim) ExecuteQueryWithMetadata Uses

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

func (*MockTxSim) ExecuteUpdate Uses

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

func (*MockTxSim) GetPrivateData Uses

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

func (*MockTxSim) GetPrivateDataHash Uses

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

func (*MockTxSim) GetPrivateDataMetadata Uses

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

func (*MockTxSim) GetPrivateDataMetadataByHash Uses

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

func (*MockTxSim) GetPrivateDataMultipleKeys Uses

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

func (*MockTxSim) GetPrivateDataRangeScanIterator Uses

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

func (*MockTxSim) GetState Uses

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

func (*MockTxSim) GetStateMetadata Uses

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

func (*MockTxSim) GetStateMultipleKeys Uses

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

func (*MockTxSim) GetStateRangeScanIterator Uses

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

func (*MockTxSim) GetStateRangeScanIteratorWithMetadata Uses

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

func (*MockTxSim) GetTxSimulationResults Uses

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

func (*MockTxSim) SetPrivateData Uses

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

func (*MockTxSim) SetPrivateDataMetadata Uses

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

func (*MockTxSim) SetPrivateDataMultipleKeys Uses

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

func (*MockTxSim) SetState Uses

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

func (*MockTxSim) SetStateMetadata Uses

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

func (*MockTxSim) SetStateMultipleKeys Uses

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

Package ccprovider imports 4 packages (graph) and is imported by 1 packages. Updated 2019-08-12. Refresh now. Tools for package owners.