Documentation ¶
Overview ¶
Wrapper for regularly used badgerDB functions
Index ¶
- func BytesToUint64(b []byte) uint64
- func Uint64ToBytes(i uint64) []byte
- type Badger
- func (b Badger) Delete(key []byte) error
- func (b Badger) Get(key []byte) ([]byte, error)
- func (b Badger) IncrementKeyValue(key []byte) (uint64, error)
- func (b Badger) IterView() ([]KVP, error)
- func (b Badger) SearchPrefix(prefix string) ([]KVP, error)
- func (b Badger) Update(key, value []byte) error
- func (b Badger) UpdateWithTTL(key, value []byte, ttl int) error
- type KVP
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToUint64 ¶
func Uint64ToBytes ¶
Types ¶
type Badger ¶
type Badger struct {
// contains filtered or unexported fields
}
Badger is a simple helper for db access
func NewBadgerDBFromPath ¶
NewBadgerDB returns a new badgerdb
func (Badger) SearchPrefix ¶
SearchPrefix returns all key value paris which match teh specified prefix
Click to show internal directories.
Click to hide internal directories.