Documentation ¶
Index ¶
- type Store
- func (m *Store) Close()
- func (m *Store) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *Store
- func (m *Store) Error(err error) *Store
- func (m *Store) GetData(key *storeapi.Key) (*storeapi.ExpiringValue, error)
- func (m *Store) GetDataMultipleKeys(key *storeapi.MultiKey) (storeapi.ExpiringValues, error)
- func (m *Store) Persist(txid string, ...) error
- func (m *Store) PutData(config *pb.StaticCollectionConfig, key *storeapi.Key, ...) error
- func (m *Store) Query(key *storeapi.QueryKey) (storeapi.ResultsIterator, error)
- func (m *Store) ResultsIteratorError(err error) *Store
- func (m *Store) WithQueryResults(key *storeapi.QueryKey, results []*storeapi.QueryResult) *Store
- type StoreProvider
- func (p *StoreProvider) Close()
- func (p *StoreProvider) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *StoreProvider
- func (p *StoreProvider) Error(err error) *StoreProvider
- func (p *StoreProvider) IsStoreClosed() bool
- func (p *StoreProvider) OpenStore(channelID string) (olapi.Store, error)
- func (p *StoreProvider) ResultsIteratorError(err error) *StoreProvider
- func (p *StoreProvider) StoreError(err error) *StoreProvider
- func (p *StoreProvider) StoreForChannel(channelID string) olapi.Store
- func (p *StoreProvider) WithQueryResults(key *storeapi.QueryKey, results []*storeapi.QueryResult) *StoreProvider
- type TransientDataStore
- func (m *TransientDataStore) Close()
- func (m *TransientDataStore) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *TransientDataStore
- func (m *TransientDataStore) Error(err error) *TransientDataStore
- func (m *TransientDataStore) GetTransientData(key *storeapi.Key) (*storeapi.ExpiringValue, error)
- func (m *TransientDataStore) GetTransientDataMultipleKeys(key *storeapi.MultiKey) (storeapi.ExpiringValues, error)
- func (m *TransientDataStore) Persist(txid string, ...) error
- type TransientDataStoreProvider
- func (p *TransientDataStoreProvider) Close()
- func (p *TransientDataStoreProvider) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *TransientDataStoreProvider
- func (p *TransientDataStoreProvider) Error(err error) *TransientDataStoreProvider
- func (p *TransientDataStoreProvider) IsStoreClosed() bool
- func (p *TransientDataStoreProvider) OpenStore(channelID string) (tdapi.Store, error)
- func (p *TransientDataStoreProvider) StoreError(err error) *TransientDataStoreProvider
- func (p *TransientDataStoreProvider) StoreForChannel(channelID string) tdapi.Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements a mock store
func (*Store) GetDataMultipleKeys ¶
GetDataMultipleKeys gets the values for the multiple items in a single call
func (*Store) Persist ¶
func (m *Store) Persist(txid string, privateSimulationResultsWithConfig *proto.TxPvtReadWriteSetWithConfigInfo) error
Persist stores the private write set of a transaction along with the collection config in the transient store based on txid and the block height the private data was received at
func (*Store) PutData ¶
func (m *Store) PutData(config *pb.StaticCollectionConfig, key *storeapi.Key, value *storeapi.ExpiringValue) error
PutData stores the key/value
func (*Store) ResultsIteratorError ¶
ResultsIteratorError sets an error on the results iterator
func (*Store) WithQueryResults ¶
WithQueryResults sets the mock query results for the given query string
type StoreProvider ¶
type StoreProvider struct {
// contains filtered or unexported fields
}
StoreProvider implements a mock transient data store provider
func NewOffLedgerStoreProvider ¶
func NewOffLedgerStoreProvider() *StoreProvider
NewOffLedgerStoreProvider returns a new provider
func (*StoreProvider) Close ¶
func (p *StoreProvider) Close()
Close closes the store for the given channel
func (*StoreProvider) Data ¶
func (p *StoreProvider) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *StoreProvider
Data invokes the Data of the store for the given key and value
func (*StoreProvider) Error ¶
func (p *StoreProvider) Error(err error) *StoreProvider
Error stores the error
func (*StoreProvider) IsStoreClosed ¶
func (p *StoreProvider) IsStoreClosed() bool
IsStoreClosed indicates whether the store is closed
func (*StoreProvider) OpenStore ¶
func (p *StoreProvider) OpenStore(channelID string) (olapi.Store, error)
OpenStore opens the transient data store for the given channel
func (*StoreProvider) ResultsIteratorError ¶
func (p *StoreProvider) ResultsIteratorError(err error) *StoreProvider
ResultsIteratorError injects an error on the results iterator
func (*StoreProvider) StoreError ¶
func (p *StoreProvider) StoreError(err error) *StoreProvider
StoreError stores the storeError
func (*StoreProvider) StoreForChannel ¶
func (p *StoreProvider) StoreForChannel(channelID string) olapi.Store
StoreForChannel returns the transient data store for the given channel
func (*StoreProvider) WithQueryResults ¶
func (p *StoreProvider) WithQueryResults(key *storeapi.QueryKey, results []*storeapi.QueryResult) *StoreProvider
WithQueryResults sets the mock query results for the given query string
type TransientDataStore ¶
type TransientDataStore struct {
// contains filtered or unexported fields
}
TransientDataStore implements a mock transient data store
func NewTransientDataStore ¶
func NewTransientDataStore() *TransientDataStore
NewTransientDataStore returns a mock transient data store
func (*TransientDataStore) Data ¶
func (m *TransientDataStore) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *TransientDataStore
Data sets the transient data for the given key
func (*TransientDataStore) Error ¶
func (m *TransientDataStore) Error(err error) *TransientDataStore
Error sets an err
func (*TransientDataStore) GetTransientData ¶
func (m *TransientDataStore) GetTransientData(key *storeapi.Key) (*storeapi.ExpiringValue, error)
GetTransientData gets the value for the given transient data item
func (*TransientDataStore) GetTransientDataMultipleKeys ¶
func (m *TransientDataStore) GetTransientDataMultipleKeys(key *storeapi.MultiKey) (storeapi.ExpiringValues, error)
GetTransientDataMultipleKeys gets the values for the multiple transient data items in a single call
func (*TransientDataStore) Persist ¶
func (m *TransientDataStore) Persist(txid string, privateSimulationResultsWithConfig *proto.TxPvtReadWriteSetWithConfigInfo) error
Persist stores the private write set of a transaction along with the collection config in the transient store based on txid and the block height the private data was received at
type TransientDataStoreProvider ¶
type TransientDataStoreProvider struct {
// contains filtered or unexported fields
}
TransientDataStoreProvider implements a mock transient data store provider
func NewTransientDataStoreProvider ¶
func NewTransientDataStoreProvider() *TransientDataStoreProvider
NewTransientDataStoreProvider creates a new provider
func (*TransientDataStoreProvider) Close ¶
func (p *TransientDataStoreProvider) Close()
Close closes the transient data store for the given channel
func (*TransientDataStoreProvider) Data ¶
func (p *TransientDataStoreProvider) Data(key *storeapi.Key, value *storeapi.ExpiringValue) *TransientDataStoreProvider
Data stores key value
func (*TransientDataStoreProvider) Error ¶
func (p *TransientDataStoreProvider) Error(err error) *TransientDataStoreProvider
Error stores the error
func (*TransientDataStoreProvider) IsStoreClosed ¶
func (p *TransientDataStoreProvider) IsStoreClosed() bool
IsStoreClosed indicates whether the transient data store is closed
func (*TransientDataStoreProvider) OpenStore ¶
func (p *TransientDataStoreProvider) OpenStore(channelID string) (tdapi.Store, error)
OpenStore opens the transient data store for the given channel
func (*TransientDataStoreProvider) StoreError ¶
func (p *TransientDataStoreProvider) StoreError(err error) *TransientDataStoreProvider
StoreError stores the StoreError
func (*TransientDataStoreProvider) StoreForChannel ¶
func (p *TransientDataStoreProvider) StoreForChannel(channelID string) tdapi.Store
StoreForChannel returns the transient data store for the given channel