Documentation ¶
Overview ¶
Package badger implements database backend based on badger.
Index ¶
- type Badger
- func (db *Badger) Close() error
- func (db *Badger) DBType() string
- func (db *Badger) Del(keys []string) error
- func (db *Badger) GC() error
- func (db *Badger) Get(key string) (string, error)
- func (db *Badger) HDel(hashmap string, keys []string) error
- func (db *Badger) HGet(hashmap, key string) (string, error)
- func (db *Badger) HGetAll(hashmap string) (map[string]string, error)
- func (db *Badger) HKeys(hashmap string) ([]string, error)
- func (db *Badger) HLen(hashmap string) (int, error)
- func (db *Badger) HSet(hashmap, key, value string) error
- func (db *Badger) Iter(prefetch, includeOffset bool, offset, prefix string, ...) error
- func (db *Badger) Open(path string) error
- func (db *Badger) Set(key, value string) error
- func (db *Badger) Size() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badger ¶
type Badger struct {
DB *badger.DB
}
Badger represents a badger database instance.
var Database Badger
Database is an instance of the database backend.
func (*Badger) Iter ¶
func (db *Badger) Iter(prefetch, includeOffset bool, offset, prefix string, handler func(key, value string) bool) error
Iter iterates through stuff in the database.
Click to show internal directories.
Click to hide internal directories.