Documentation
¶
Index ¶
- type MockStore
- func (s *MockStore) CreateIndex(createIndexRequest storage.CreateIndexRequest) error
- func (s *MockStore) Delete(k string) error
- func (s *MockStore) Get(k string) ([]byte, error)
- func (s *MockStore) GetAll() (map[string][]byte, error)
- func (s *MockStore) GetBulk(keys ...string) ([][]byte, error)
- func (s *MockStore) Put(k string, v []byte) error
- func (s *MockStore) PutBulk(keys []string, values [][]byte) error
- func (s *MockStore) Query(query string) (storage.ResultsIterator, error)
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockStore ¶
type MockStore struct {
Store map[string][]byte
ErrPut error
ErrPutBulk error
ErrGet error
ErrBulkGet error
ErrGetAll error
ErrCreateIndex error
ErrQuery error
ErrDelete error
ResultsIteratorToReturn storage.ResultsIterator
// contains filtered or unexported fields
}
MockStore represents a mock store.
func (*MockStore) CreateIndex ¶ added in v0.1.3
func (s *MockStore) CreateIndex(createIndexRequest storage.CreateIndexRequest) error
CreateIndex returns a mocked error.
func (*MockStore) GetAll ¶ added in v0.1.4
GetAll fetches all the key-value pairs within this store.
func (*MockStore) GetBulk ¶ added in v0.1.5
GetBulk fetches the values associated with the given keys. This method works in an all-or-nothing manner. It returns an error if any of the keys don't exist. If even one key is missing, then no values are returned.
type Provider ¶
type Provider struct {
Store *MockStore
ErrCreateStore error
ErrOpenStoreHandle error
FailNameSpace string
}
Provider mock store provider.
func NewMockStoreProvider ¶
func NewMockStoreProvider() *Provider
NewMockStoreProvider new store provider instance.
func (*Provider) CloseStore ¶
CloseStore closes store for given name space.
func (*Provider) CreateStore ¶ added in v0.1.2
CreateStore creates a new store with the given name.
Click to show internal directories.
Click to hide internal directories.