Documentation ¶
Index ¶
- type DBEntry
- type MockStore
- func (s *MockStore) Batch(operations []storage.Operation) error
- func (s *MockStore) Close() error
- func (s *MockStore) Delete(k string) error
- func (s *MockStore) Flush() error
- func (s *MockStore) Get(k string) ([]byte, error)
- func (s *MockStore) GetBulk(keys ...string) ([][]byte, error)
- func (s *MockStore) GetTags(key string) ([]storage.Tag, error)
- func (s *MockStore) Put(k string, v []byte, tags ...storage.Tag) error
- func (s *MockStore) Query(expression string, _ ...storage.QueryOption) (storage.Iterator, error)
- type MockStoreProvider
- func (s *MockStoreProvider) Close() error
- func (s *MockStoreProvider) CloseStore(name string) error
- func (s *MockStoreProvider) GetOpenStores() []storage.Store
- func (s *MockStoreProvider) GetStoreConfig(name string) (storage.StoreConfiguration, error)
- func (s *MockStoreProvider) OpenStore(name string) (storage.Store, error)
- func (s *MockStoreProvider) SetStoreConfig(name string, config storage.StoreConfiguration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBEntry ¶ added in v0.1.6
DBEntry is a value plus optional tags that are associated with some key.
type MockStore ¶
type MockStore struct { Store map[string]DBEntry ErrPut error ErrGet error ErrDelete error ErrQuery error ErrNext error ErrValue error ErrKey error ErrBatch error ErrClose error // contains filtered or unexported fields }
MockStore mock store.
type MockStoreProvider ¶
type MockStoreProvider struct { Store *MockStore Custom storage.Store ErrOpenStoreHandle error ErrSetStoreConfig error ErrClose error ErrCloseStore error FailNamespace string }
MockStoreProvider mock store provider.
func NewCustomMockStoreProvider ¶
func NewCustomMockStoreProvider(customStore storage.Store) *MockStoreProvider
NewCustomMockStoreProvider new mock store provider instance from existing mock store.
func NewMockStoreProvider ¶
func NewMockStoreProvider() *MockStoreProvider
NewMockStoreProvider new store provider instance.
func (*MockStoreProvider) Close ¶
func (s *MockStoreProvider) Close() error
Close closes all stores created under this store provider.
func (*MockStoreProvider) CloseStore ¶
func (s *MockStoreProvider) CloseStore(name string) error
CloseStore closes store for given name space.
func (*MockStoreProvider) GetOpenStores ¶ added in v0.1.6
func (s *MockStoreProvider) GetOpenStores() []storage.Store
GetOpenStores is not implemented.
func (*MockStoreProvider) GetStoreConfig ¶ added in v0.1.6
func (s *MockStoreProvider) GetStoreConfig(name string) (storage.StoreConfiguration, error)
GetStoreConfig is not implemented.
func (*MockStoreProvider) OpenStore ¶
func (s *MockStoreProvider) OpenStore(name string) (storage.Store, error)
OpenStore opens and returns a store for given name space.
func (*MockStoreProvider) SetStoreConfig ¶ added in v0.1.6
func (s *MockStoreProvider) SetStoreConfig(name string, config storage.StoreConfiguration) error
SetStoreConfig always return a nil error.
Click to show internal directories.
Click to hide internal directories.