Documentation ¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- type DCASStubWrapperFactory
- func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapper(coll string, stub shim.ChaincodeStubInterface) (dcasclient.DCAS, error)
- func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperArgsForCall(i int) (string, shim.ChaincodeStubInterface)
- func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperCallCount() int
- func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperReturns(result1 dcasclient.DCAS, result2 error)
- func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperReturnsOnCall(i int, result1 dcasclient.DCAS, result2 error)
- func (fake *DCASStubWrapperFactory) Invocations() map[string][][]interface{}
- type MockStateQueryIterator
- type MockStub
- func (stub *MockStub) DelState(key string) error
- func (stub *MockStub) GetArgs() [][]byte
- func (stub *MockStub) GetPrivateData(collection string, key string) ([]byte, error)
- func (stub *MockStub) GetPrivateDataQueryResult(collection, query string) (shim.StateQueryIteratorInterface, error)
- func (stub *MockStub) GetState(key string) ([]byte, error)
- func (stub *MockStub) GetTransient() (map[string][]byte, error)
- func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response
- func (stub *MockStub) MockInit(uuid string, args [][]byte) pb.Response
- func (stub *MockStub) MockInvoke(uuid string, args [][]byte) pb.Response
- func (stub *MockStub) PutPrivateData(collection string, key string, value []byte) error
- func (stub *MockStub) PutState(key string, value []byte) error
- type ProtocolClientChannelProvider
- func (fake *ProtocolClientChannelProvider) Invocations() map[string][][]interface{}
- func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannel(channelID string) (ctxcommon.ProtocolClientProvider, error)
- func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelArgsForCall(i int) string
- func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelCallCount() int
- func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturns(result1 ctxcommon.ProtocolClientProvider, result2 error)
- func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturnsOnCall(i int, result1 ctxcommon.ProtocolClientProvider, result2 error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DCASStubWrapperFactory ¶ added in v0.1.5
type DCASStubWrapperFactory struct { CreateDCASClientStubWrapperStub func(coll string, stub shim.ChaincodeStubInterface) (dcasclient.DCAS, error) // contains filtered or unexported fields }
func (*DCASStubWrapperFactory) CreateDCASClientStubWrapper ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapper(coll string, stub shim.ChaincodeStubInterface) (dcasclient.DCAS, error)
func (*DCASStubWrapperFactory) CreateDCASClientStubWrapperArgsForCall ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperArgsForCall(i int) (string, shim.ChaincodeStubInterface)
func (*DCASStubWrapperFactory) CreateDCASClientStubWrapperCallCount ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperCallCount() int
func (*DCASStubWrapperFactory) CreateDCASClientStubWrapperReturns ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperReturns(result1 dcasclient.DCAS, result2 error)
func (*DCASStubWrapperFactory) CreateDCASClientStubWrapperReturnsOnCall ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) CreateDCASClientStubWrapperReturnsOnCall(i int, result1 dcasclient.DCAS, result2 error)
func (*DCASStubWrapperFactory) Invocations ¶ added in v0.1.5
func (fake *DCASStubWrapperFactory) Invocations() map[string][][]interface{}
type MockStateQueryIterator ¶
type MockStateQueryIterator struct { Closed bool Stub *MockStub Query string Current *list.Element }
MockStateQueryIterator is a mock implementation of the state query iterator
func NewMockStateQueryIterator ¶
func NewMockStateQueryIterator(stub *MockStub, collection, query string) *MockStateQueryIterator
NewMockStateQueryIterator returns a mock state iterator
func (*MockStateQueryIterator) Close ¶
func (iter *MockStateQueryIterator) Close() error
Close closes the range query iterator. This should be called when done reading from the iterator to free up resources.
func (*MockStateQueryIterator) HasNext ¶
func (iter *MockStateQueryIterator) HasNext() bool
HasNext returns true if the range query iterator contains additional keys and values.
func (*MockStateQueryIterator) Next ¶
func (iter *MockStateQueryIterator) Next() (*queryresult.KV, error)
Next returns the next key and value in the range query iterator.
type MockStub ¶
type MockStub struct { shimtest.MockStub // registered list of other MockStub chaincodes that can be called from this MockStub Invokables map[string]*MockStub // Transient map Transient map[string][]byte //PvtState contains private state PvtState map[string]stateMap // Keys stores the list of mapped values in lexical order Keys map[string]*list.List // Errors used for testing GetPrivateErr error PutPrivateErr error GetPrivateQueryErr error // contains filtered or unexported fields }
MockStub is an implementation of ChaincodeStubInterface for unit testing chaincode. Use this instead of ChaincodeStub in your chaincode's unit test calls to Init or Invoke.
func NewMockStub ¶
NewMockStub initializes state map, private state, transients, invokables etc.
func (*MockStub) GetPrivateData ¶
GetPrivateData implements get private data
func (*MockStub) GetPrivateDataQueryResult ¶
func (stub *MockStub) GetPrivateDataQueryResult(collection, query string) (shim.StateQueryIteratorInterface, error)
GetPrivateDataQueryResult mocks rich query
func (*MockStub) GetTransient ¶
GetTransient returns transient map
func (*MockStub) InvokeChaincode ¶
func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte, channel string) pb.Response
InvokeChaincode calls a peered chaincode. E.g. stub1.InvokeChaincode("stub2Hash", funcArgs, channel) Before calling this make sure to create another MockStub stub2, call stub2.MockInit(uuid, func, args) and register it with stub1 by calling stub1.MockPeerChaincode("stub2Hash", stub2)
func (*MockStub) MockInvoke ¶
MockInvoke invokes chaincode
func (*MockStub) PutPrivateData ¶
PutPrivateData implements put private data
type ProtocolClientChannelProvider ¶ added in v0.1.5
type ProtocolClientChannelProvider struct { ProtocolClientProviderForChannelStub func(channelID string) (ctxcommon.ProtocolClientProvider, error) // contains filtered or unexported fields }
func (*ProtocolClientChannelProvider) Invocations ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) Invocations() map[string][][]interface{}
func (*ProtocolClientChannelProvider) ProtocolClientProviderForChannel ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannel(channelID string) (ctxcommon.ProtocolClientProvider, error)
func (*ProtocolClientChannelProvider) ProtocolClientProviderForChannelArgsForCall ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelArgsForCall(i int) string
func (*ProtocolClientChannelProvider) ProtocolClientProviderForChannelCallCount ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelCallCount() int
func (*ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturns ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturns(result1 ctxcommon.ProtocolClientProvider, result2 error)
func (*ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturnsOnCall ¶ added in v0.1.5
func (fake *ProtocolClientChannelProvider) ProtocolClientProviderForChannelReturnsOnCall(i int, result1 ctxcommon.ProtocolClientProvider, result2 error)