Documentation ¶
Index ¶
- type Iterator
- type Provider
- type Store
- func (s *Store) Batch([]spi.Operation) error
- func (s *Store) Close() error
- func (s *Store) Delete(string) error
- func (s *Store) Flush() error
- func (s *Store) Get(string) ([]byte, error)
- func (s *Store) GetBulk(...string) ([][]byte, error)
- func (s *Store) GetTags(string) ([]spi.Tag, error)
- func (s *Store) Put(string, []byte, ...spi.Tag) error
- func (s *Store) Query(string, ...spi.QueryOption) (spi.Iterator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct { NextReturn bool ErrNext error KeyReturn string ErrKey error ValueReturn []byte ErrValue error TagsReturn []spi.Tag ErrTags error TotalItemsReturn int ErrTotalItems error ErrClose error }
Iterator is a mocked implementation of spi.Iterator.
func (*Iterator) TotalItems ¶
TotalItems returns mocked results.
type Provider ¶
type Provider struct { OpenStoreReturn spi.Store ErrOpenStore error ErrSetStoreConfig error GetStoreConfigReturn spi.StoreConfiguration ErrGetStoreConfig error GetOpenStoresReturn []spi.Store ErrClose error }
Provider is a mocked implementation of spi.Provider.
func (*Provider) GetOpenStores ¶
GetOpenStores returns mocked results.
func (*Provider) GetStoreConfig ¶
func (p *Provider) GetStoreConfig(string) (spi.StoreConfiguration, error)
GetStoreConfig returns mocked results.
func (*Provider) SetStoreConfig ¶
func (p *Provider) SetStoreConfig(string, spi.StoreConfiguration) error
SetStoreConfig returns mocked results.
type Store ¶
type Store struct { ErrPut error GetReturn []byte ErrGet error GetTagsReturn []spi.Tag ErrGetTags error GetBulkReturn [][]byte ErrGetBulk error QueryReturn spi.Iterator ErrQuery error ErrDelete error ErrBatch error ErrFlush error ErrClose error }
Store is a mocked implementation of spi.Store.
Directories ¶
Path | Synopsis |
---|---|
Package storage provides an alternative implementation of a mock Store, supporting most of a MemStore's behaviour with the added ability to override return values.
|
Package storage provides an alternative implementation of a mock Store, supporting most of a MemStore's behaviour with the added ability to override return values. |
Click to show internal directories.
Click to hide internal directories.