Documentation
¶
Index ¶
- type BadgerStore
- type Options
- type StoreBinaryKey
- func (s *StoreBinaryKey) BadgerDB() *badger.DB
- func (s *StoreBinaryKey) Close(ctx context.Context) error
- func (s *StoreBinaryKey[K, V, KP]) Delete(ctx context.Context, k K) error
- func (s *StoreBinaryKey[K, V, KP]) Edit(ctx context.Context, k K, edit kv.Edit[V]) error
- func (s *StoreBinaryKey[K, V, KP]) Get(ctx context.Context, k K) (V, error)
- func (s *StoreBinaryKey[K, V, KP]) Range(ctx context.Context, iter kv.Iter[K, V]) error
- func (s *StoreBinaryKey[K, V, KP]) RangeWithOptions(ctx context.Context, opt badger.IteratorOptions, iter kv.Iter[K, V]) error
- func (s *StoreBinaryKey[K, V, KP]) RangeWithPrefix(ctx context.Context, k K, iter kv.Iter[K, V]) error
- func (s *StoreBinaryKey[K, V, KP]) Set(ctx context.Context, k K, v V) error
- func (s *StoreBinaryKey[K, V, KP]) Transaction(update bool) (kv.Store[K, V], error)
- type StoreBytesKey
- func (s *StoreBytesKey) BadgerDB() *badger.DB
- func (s *StoreBytesKey) Close(ctx context.Context) error
- func (s *StoreBytesKey[K, V]) Delete(ctx context.Context, k K) error
- func (s *StoreBytesKey[K, V]) Edit(ctx context.Context, k K, edit kv.Edit[V]) error
- func (s *StoreBytesKey[K, V]) Get(ctx context.Context, k K) (v V, err error)
- func (s *StoreBytesKey[K, V]) Range(ctx context.Context, iter kv.Iter[K, V]) error
- func (s *StoreBytesKey[K, V]) RangeOrdered(ctx context.Context, order kv.Order[K], iter kv.Iter[K, V]) error
- func (s *StoreBytesKey[K, V]) RangeWithOptions(ctx context.Context, opt badger.IteratorOptions, iter kv.Iter[K, V]) error
- func (s *StoreBytesKey[K, V]) RangeWithPrefix(ctx context.Context, k K, iter kv.Iter[K, V]) error
- func (s *StoreBytesKey[K, V]) Set(ctx context.Context, k K, v V) error
- func (s *StoreBytesKey[K, V]) Transaction(update bool) (kv.Store[K, V], error)
- type StoreRaw
- func (s *StoreRaw) BadgerDB() *badger.DB
- func (s *StoreRaw) Close(ctx context.Context) error
- func (s *StoreRaw[K, V]) Delete(ctx context.Context, k K) error
- func (s *StoreRaw[K, V]) Edit(ctx context.Context, k K, edit kv.Edit[V]) error
- func (s *StoreRaw[K, V]) Get(ctx context.Context, k K) (v V, err error)
- func (s *StoreRaw[K, V]) Range(ctx context.Context, iter kv.Iter[K, V]) error
- func (s *StoreRaw[K, V]) RangeWithOptions(ctx context.Context, opt badger.IteratorOptions, iter kv.Iter[K, V]) error
- func (s *StoreRaw[K, V]) RangeWithPrefix(ctx context.Context, k K, iter kv.Iter[K, V]) error
- func (s *StoreRaw[K, V]) Set(ctx context.Context, k K, v V) error
- func (s *StoreRaw[K, V]) Transaction(update bool) (kv.Store[K, V], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadgerStore ¶
type BadgerStore interface {
BadgerDB() *badger.DB
}
type Options ¶
type Options[V any] struct { Codec kv.Codec[V] BadgerOptions badger.Options DefaultTTL time.Duration }
func DefaultOptions ¶
type StoreBinaryKey ¶
type StoreBinaryKey[K encoding.BinaryMarshaler, V any, KP binaryPointer[K]] struct { // contains filtered or unexported fields }
func NewBinaryKey ¶
func NewBinaryKey[K encoding.BinaryMarshaler, V any, KP binaryPointer[K]](opts Options[V]) (*StoreBinaryKey[K, V, KP], error)
func (*StoreBinaryKey[K, V, KP]) Delete ¶
func (s *StoreBinaryKey[K, V, KP]) Delete(ctx context.Context, k K) error
func (*StoreBinaryKey[K, V, KP]) Get ¶
func (s *StoreBinaryKey[K, V, KP]) Get(ctx context.Context, k K) (V, error)
func (*StoreBinaryKey[K, V, KP]) RangeWithOptions ¶
func (*StoreBinaryKey[K, V, KP]) RangeWithPrefix ¶
func (*StoreBinaryKey[K, V, KP]) Set ¶
func (s *StoreBinaryKey[K, V, KP]) Set(ctx context.Context, k K, v V) error
func (*StoreBinaryKey[K, V, KP]) Transaction ¶
func (s *StoreBinaryKey[K, V, KP]) Transaction(update bool) (kv.Store[K, V], error)
type StoreBytesKey ¶
func (*StoreBytesKey[K, V]) Delete ¶
func (s *StoreBytesKey[K, V]) Delete(ctx context.Context, k K) error
func (*StoreBytesKey[K, V]) Get ¶
func (s *StoreBytesKey[K, V]) Get(ctx context.Context, k K) (v V, err error)
func (*StoreBytesKey[K, V]) RangeOrdered ¶
func (*StoreBytesKey[K, V]) RangeWithOptions ¶
func (*StoreBytesKey[K, V]) RangeWithPrefix ¶
func (*StoreBytesKey[K, V]) Set ¶
func (s *StoreBytesKey[K, V]) Set(ctx context.Context, k K, v V) error
func (*StoreBytesKey[K, V]) Transaction ¶
func (s *StoreBytesKey[K, V]) Transaction(update bool) (kv.Store[K, V], error)
Transaction implements kv.TransactionalStore.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.