Documentation
¶
Index ¶
- Variables
- type MockFiler
- func (m *MockFiler) Backend() any
- func (m *MockFiler) Close() error
- func (m *MockFiler) Delete(key []byte) error
- func (m *MockFiler) Get(key []byte) ([]byte, error)
- func (m *MockFiler) Has(key []byte) bool
- func (m *MockFiler) Keys() [][]byte
- func (m *MockFiler) Len() int
- func (m *MockFiler) Put(key []byte, value []byte) error
- func (m *MockFiler) Sync() error
- type MockKeeper
- func (m *MockKeeper) AllStores() map[string]database.Filer
- func (m *MockKeeper) BackupAll(archivePath string) (models.Backup, error)
- func (m *MockKeeper) Close(name string) error
- func (m *MockKeeper) CloseAll() error
- func (m *MockKeeper) Destroy(name string) error
- func (m *MockKeeper) Discover() ([]string, error)
- func (m *MockKeeper) Init(name string, options ...any) error
- func (m *MockKeeper) Meta() models.Metadata
- func (m *MockKeeper) Path() string
- func (m *MockKeeper) RestoreAll(archivePath string) error
- func (m *MockKeeper) SyncAll() error
- func (m *MockKeeper) SyncAndCloseAll() error
- func (m *MockKeeper) With(name string) database.Filer
- func (m *MockKeeper) WithNew(name string, options ...any) database.Filer
- func (m *MockKeeper) WriteMeta(path string) error
- type MockOpt
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadOptions = errors.New("bad mock filer options")
View Source
var ErrKeyNotFound = errors.New("key not found")
Functions ¶
This section is empty.
Types ¶
type MockKeeper ¶
type MockKeeper struct {
// contains filtered or unexported fields
}
func NewMockKeeper ¶
func NewMockKeeper(name string, defopts ...any) *MockKeeper
func (*MockKeeper) BackupAll ¶
func (m *MockKeeper) BackupAll(archivePath string) (models.Backup, error)
func (*MockKeeper) Close ¶
func (m *MockKeeper) Close(name string) error
func (*MockKeeper) CloseAll ¶
func (m *MockKeeper) CloseAll() error
func (*MockKeeper) Destroy ¶
func (m *MockKeeper) Destroy(name string) error
func (*MockKeeper) Discover ¶
func (m *MockKeeper) Discover() ([]string, error)
func (*MockKeeper) Meta ¶
func (m *MockKeeper) Meta() models.Metadata
func (*MockKeeper) Path ¶
func (m *MockKeeper) Path() string
func (*MockKeeper) RestoreAll ¶
func (m *MockKeeper) RestoreAll(archivePath string) error
func (*MockKeeper) SyncAll ¶
func (m *MockKeeper) SyncAll() error
func (*MockKeeper) SyncAndCloseAll ¶
func (m *MockKeeper) SyncAndCloseAll() error
func (*MockKeeper) WithNew ¶
func (m *MockKeeper) WithNew(name string, options ...any) database.Filer
func (*MockKeeper) WriteMeta ¶
func (m *MockKeeper) WriteMeta(path string) error
Click to show internal directories.
Click to hide internal directories.