Versions in this module Expand all Collapse all v0 v0.3.0 Nov 21, 2026 Changes in this version + func ScopedKey(accountID, prefix, key string) string + func ScopedPrefix(accountID, prefix string) string + type BadgerLogger struct + func NewBadgerLogger(l Logger) *BadgerLogger + func (bl *BadgerLogger) Debugf(format string, args ...interface{}) + func (bl *BadgerLogger) Errorf(format string, args ...interface{}) + func (bl *BadgerLogger) Infof(format string, args ...interface{}) + func (bl *BadgerLogger) Warningf(format string, args ...interface{}) + type Filter struct + Path string + Value string + type LevelMetrics struct + Level int + NumTables int + Size int64 + type Logger interface + Debug func(msg string) + Error func(msg string) + Info func(msg string) + Warn func(msg string) + func NewZerologLogger(l zerolog.Logger) Logger + type Metrics struct + BlockCacheHits int64 + BlockCacheMisses int64 + DeleteOps int64 + DiskFree uint64 + DiskTotal uint64 + DiskUsedPct float64 + GetOps int64 + LevelSizes []LevelMetrics + NumKeys int64 + NumLevels int + NumTables int + PutOps int64 + SizeLsm int64 + SizeTotal int64 + SizeVLog int64 + func NewMetrics(db *badger.DB) *Metrics + type Options struct + Application string + BlockCacheSize int64 + Component string + IndexCacheSize int64 + Location string + Logger Logger + type Query struct + Filters []*Filter + Limit int + Offset int + Prefix string + TimeRange TimeRange + type Store struct + DB *badger.DB + Location string + Logger Logger + func NewStore(options *Options) (*Store, error) + func (s *Store) CollectMetrics() *Metrics + func (store *Store) Close() error + func (store *Store) DeleteByMeta(meta byte) error + func (store *Store) DeleteByPrefix(prefix string) error + func (store *Store) DeleteKeys(keysForDelete [][]byte) error + func (store *Store) DeleteOneByKey(key string) error + func (store *Store) DeleteScoped(accountID, prefix, key string) error + func (store *Store) DeleteScopedByPrefix(accountID, prefix string) error + func (store *Store) GarbageCollection() error + func (store *Store) Get(prefix string, v interface{}) error + func (store *Store) GetByMeta(meta byte, v interface{}) error + func (store *Store) GetCount(query *Query) (int, error) + func (store *Store) GetKeyExists(key string) (bool, error) + func (store *Store) GetMetrics() *Metrics + func (store *Store) GetOne(key string, obj interface{}) error + func (store *Store) GetOneByFilter(prefix string, filters *[]Filter, obj interface{}) error + func (store *Store) GetOneByFilterRaw(prefix string, filter Filter) (string, error) + func (store *Store) GetOneRaw(key string) (string, error) + func (store *Store) GetScoped(accountID, prefix, key string, obj interface{}) error + func (store *Store) GetScopedByFilter(accountID, prefix string, filters *[]Filter, obj interface{}) error + func (store *Store) GetScopedCount(accountID string, query *Query) (int, error) + func (store *Store) GetScopedStream(w io.Writer, wg *sync.WaitGroup, accountID string, query *Query) + func (store *Store) GetScopedStreamProjected(w io.Writer, wg *sync.WaitGroup, accountID string, query *Query, ...) + func (store *Store) GetStream(w io.Writer, wg *sync.WaitGroup, query *Query) + func (store *Store) GetStreamProjected(w io.Writer, wg *sync.WaitGroup, query *Query, ...) + func (store *Store) GetWithQuery(query *Query, v interface{}) error + func (store *Store) ListScoped(accountID, prefix string, v interface{}) error + func (store *Store) ListScopedWithQuery(accountID string, query *Query, v interface{}) error + func (store *Store) PutJSONPipe(prefix string, stream *io.PipeReader) error + func (store *Store) PutOne(key string, obj interface{}) error + func (store *Store) PutOneRaw(key string, obj string) error + func (store *Store) PutOneRawWithTTL(key string, obj string, ttl time.Duration) error + func (store *Store) PutOneRawWithTTLAndMeta(key string, obj string, ttl time.Duration, meta byte) error + func (store *Store) PutOneWithTTL(key string, obj interface{}, ttl time.Duration) error + func (store *Store) PutOneWithTTLAndMeta(key string, obj interface{}, ttl time.Duration, meta byte) error + func (store *Store) PutScoped(accountID, prefix, key string, obj interface{}) error + func (store *Store) PutScopedWithTTL(accountID, prefix, key string, obj interface{}, ttl time.Duration) error + func (store *Store) PutSlice(prefix string, id string, objs interface{}) error + func (store *Store) PutStream(prefix string, r io.Reader) error + func (store *Store) StartGC(ctx context.Context, interval time.Duration) + type TimeRange struct + End time.Time + Start time.Time