Documentation
¶
Index ¶
- Variables
- type BboltStore
- func (s *BboltStore) Close() error
- func (s *BboltStore) Compact() error
- func (s *BboltStore) Delete(namespace, key string) error
- func (s *BboltStore) EnsureNamespace(namespace string) error
- func (s *BboltStore) Get(namespace, key string) ([]byte, error)
- func (s *BboltStore) List(namespace, prefix string, limit int) ([]Record, error)
- func (s *BboltStore) Put(namespace, key string, value []byte) error
- func (s *BboltStore) Snapshot() (Snapshot, error)
- func (s *BboltStore) Update(fn func(Tx) error) error
- func (s *BboltStore) View(fn func(Tx) error) error
- type FakeStore
- func (s *FakeStore) Close() error
- func (s *FakeStore) Compact() error
- func (s *FakeStore) Delete(namespace, key string) error
- func (s *FakeStore) EnsureNamespace(namespace string) error
- func (s *FakeStore) Get(namespace, key string) ([]byte, error)
- func (s *FakeStore) List(namespace, prefix string, limit int) ([]Record, error)
- func (s *FakeStore) Put(namespace, key string, value []byte) error
- func (s *FakeStore) Snapshot() (Snapshot, error)
- func (s *FakeStore) Update(fn func(Tx) error) error
- func (s *FakeStore) View(fn func(Tx) error) error
- type Record
- type Snapshot
- type Store
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNamespaceRequired = errors.New("namespace is required") ErrKeyRequired = errors.New("key is required") ErrValueRequired = errors.New("value is required") ErrPathRequired = errors.New("path is required") ErrStoreLocked = errors.New("store is locked by another process") ErrStoreClosed = errors.New("store is closed") ErrReadOnlyTx = errors.New("transaction is read-only") ErrNotFound = errors.New("record not found") ErrNegativeListLimit = errors.New("list limit cannot be negative") )
Functions ¶
This section is empty.
Types ¶
type BboltStore ¶
type BboltStore struct {
// contains filtered or unexported fields
}
func OpenBboltStore ¶
func OpenBboltStore(path string) (*BboltStore, error)
func (*BboltStore) Close ¶
func (s *BboltStore) Close() error
func (*BboltStore) Compact ¶
func (s *BboltStore) Compact() error
func (*BboltStore) Delete ¶
func (s *BboltStore) Delete(namespace, key string) error
func (*BboltStore) EnsureNamespace ¶
func (s *BboltStore) EnsureNamespace(namespace string) error
func (*BboltStore) List ¶
func (s *BboltStore) List(namespace, prefix string, limit int) ([]Record, error)
func (*BboltStore) Snapshot ¶
func (s *BboltStore) Snapshot() (Snapshot, error)
type FakeStore ¶
type FakeStore struct {
// contains filtered or unexported fields
}
func NewFakeStore ¶
func NewFakeStore() *FakeStore
func (*FakeStore) EnsureNamespace ¶
type Store ¶
type Store interface {
EnsureNamespace(namespace string) error
Put(namespace, key string, value []byte) error
Get(namespace, key string) ([]byte, error)
Delete(namespace, key string) error
List(namespace, prefix string, limit int) ([]Record, error)
View(fn func(Tx) error) error
Update(fn func(Tx) error) error
Snapshot() (Snapshot, error)
Compact() error
Close() error
}
Click to show internal directories.
Click to hide internal directories.