Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockIterator ¶
type MockIterator struct {
// contains filtered or unexported fields
}
MockIterator is the mock implementation of storage iterator
func (*MockIterator) Key ¶
func (s *MockIterator) Key() []byte
Key returns the key of the current key/value pair.
func (*MockIterator) Next ¶
func (s *MockIterator) Next() bool
Next moves pointer to next value of iterator. It returns false if the iterator is exhausted.
func (*MockIterator) Release ¶
func (s *MockIterator) Release()
Release releases associated resources.
func (*MockIterator) Value ¶
func (s *MockIterator) Value() []byte
Value returns the value of the current key/value pair.
type MockStore ¶
type MockStore struct {
Store map[string][]byte
ErrPut error
ErrGet error
ErrItr error
// contains filtered or unexported fields
}
MockStore mock store.
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.