Documentation ¶
Index ¶
- func DefaultOptions(path string) badger.Options
- type Badger
- func (storage *Badger) Close() error
- func (storage *Badger) Connection(name string) storage.Storage
- func (storage *Badger) Delete(key string) (err error)
- func (storage *Badger) DeleteByPrefix(prefix []byte)
- func (storage *Badger) Get(key string) (value []byte, err error)
- func (storage *Badger) Iterate(fn func(key []byte, value []byte))
- func (storage *Badger) IterateByPrefix(prefix []byte, limit uint64, fn func(key []byte, value []byte)) uint64
- func (storage *Badger) IterateByPrefixFrom(prefix []byte, from []byte, limit uint64, fn func(key []byte, value []byte)) uint64
- func (storage *Badger) KeysByPrefixCount(prefix []byte) uint64
- func (storage *Badger) Reset() (err error)
- func (storage *Badger) Set(key string, value []byte, exp time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultOptions ¶
func DefaultOptions(path string) badger.Options
Types ¶
type Badger ¶
type Badger struct {
// contains filtered or unexported fields
}
Badger implements wrapper for badger database
func (*Badger) DeleteByPrefix ¶
DeleteByPrefix iterates over keys with prefix
func (*Badger) IterateByPrefix ¶
func (storage *Badger) IterateByPrefix(prefix []byte, limit uint64, fn func(key []byte, value []byte)) uint64
IterateByPrefix iterates over keys with prefix
func (*Badger) IterateByPrefixFrom ¶
func (storage *Badger) IterateByPrefixFrom(prefix []byte, from []byte, limit uint64, fn func(key []byte, value []byte)) uint64
IterateByPrefixFrom iterates over keys with prefix
func (*Badger) KeysByPrefixCount ¶
Click to show internal directories.
Click to hide internal directories.