Documentation ¶
Index ¶
- Variables
- type BBoltDB
- func (b *BBoltDB) Close()
- func (b *BBoltDB) Del(key string) error
- func (b *BBoltDB) Empty() (bool, error)
- func (b *BBoltDB) GC() error
- func (b *BBoltDB) Get(k string) ([]byte, error)
- func (b *BBoltDB) Incr(k string, by int64) (int64, error)
- func (b *BBoltDB) MDel(keys []string) error
- func (b *BBoltDB) MGet(keys []string) [][]byte
- func (b *BBoltDB) MSet(data map[string][]byte) error
- func (b *BBoltDB) Scan(scannerOpt ScannerOptions) error
- func (b *BBoltDB) Set(k string, v []byte, ttl time.Duration) error
- func (b *BBoltDB) Size() int64
- func (b *BBoltDB) TTL(key string) int64
- type BadgerDB
- func (bdb *BadgerDB) Close()
- func (bdb *BadgerDB) Del(key string) error
- func (bdb *BadgerDB) Empty() (bool, error)
- func (bdb *BadgerDB) GC() error
- func (bdb *BadgerDB) Get(k string) ([]byte, error)
- func (bdb *BadgerDB) Incr(k string, by int64) (int64, error)
- func (bdb *BadgerDB) MDel(keys []string) error
- func (bdb *BadgerDB) MGet(keys []string) [][]byte
- func (bdb *BadgerDB) MSet(data map[string][]byte) error
- func (bdb *BadgerDB) Scan(scannerOpt ScannerOptions) error
- func (bdb *BadgerDB) Set(k string, v []byte, ttl time.Duration) error
- func (bdb *BadgerDB) Size() int64
- func (bdb *BadgerDB) TTL(key string) int64
- type DB
- type LevelDB
- func (ldb *LevelDB) Close()
- func (ldb *LevelDB) Del(key string) error
- func (ldb *LevelDB) Empty() (bool, error)
- func (ldb *LevelDB) GC() error
- func (ldb *LevelDB) Get(k string) ([]byte, error)
- func (ldb *LevelDB) Incr(k string, by int64) (int64, error)
- func (ldb *LevelDB) MDel(keys []string) error
- func (ldb *LevelDB) MGet(keys []string) [][]byte
- func (ldb *LevelDB) MSet(data map[string][]byte) error
- func (ldb *LevelDB) Scan(scannerOpt ScannerOptions) error
- func (ldb *LevelDB) Set(k string, v []byte, ttl time.Duration) error
- func (ldb *LevelDB) Size() int64
- func (ldb *LevelDB) TTL(key string) int64
- type PogrebDB
- func (pdb *PogrebDB) Close()
- func (pdb *PogrebDB) Del(key string) error
- func (pdb *PogrebDB) Empty() (bool, error)
- func (pdb *PogrebDB) GC() error
- func (pdb *PogrebDB) Get(k string) ([]byte, error)
- func (pdb *PogrebDB) Incr(k string, by int64) (int64, error)
- func (pdb *PogrebDB) MDel(keys []string) error
- func (pdb *PogrebDB) MGet(keys []string) [][]byte
- func (pdb *PogrebDB) MSet(data map[string][]byte) error
- func (pdb *PogrebDB) Scan(scannerOpt ScannerOptions) error
- func (pdb *PogrebDB) Set(k string, v []byte, ttl time.Duration) error
- func (pdb *PogrebDB) Size() int64
- func (pdb *PogrebDB) TTL(key string) int64
- type ScannerOptions
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type BBoltDB ¶
BBoltDB - represents a bbolt db implementation
func OpenBoltDBB ¶
OpenBoltDB - Opens the specified path
func (*BBoltDB) Scan ¶
func (b *BBoltDB) Scan(scannerOpt ScannerOptions) error
Scan - iterate over the whole store using the handler function
type BadgerDB ¶
BadgerDB - represents a badger db implementation
func OpenBadgerDB ¶
OpenPogrebDB - Opens the specified path
func (*BadgerDB) Scan ¶
func (bdb *BadgerDB) Scan(scannerOpt ScannerOptions) error
Scan - iterate over the whole store using the handler function
type DB ¶
type DB interface { Incr(k string, by int64) (int64, error) Set(k string, v []byte, ttl time.Duration) error MSet(data map[string][]byte) error Get(k string) ([]byte, error) MGet(keys []string) [][]byte TTL(key string) int64 MDel(keys []string) error Del(key string) error Scan(ScannerOpt ScannerOptions) error Empty() (bool, error) Size() int64 GC() error Close() }
DB Interface
type LevelDB ¶
LevelDB - represents a leveldb db implementation
func OpenLevelDB ¶
OpenLevelDB - Opens the specified path
func (*LevelDB) Scan ¶
func (ldb *LevelDB) Scan(scannerOpt ScannerOptions) error
Scan - iterate over the whole store using the handler function
type PogrebDB ¶
PogrebDB - represents a pogreb db implementation
func OpenPogrebDB ¶
OpenPogrebDB - Opens the specified path
func (*PogrebDB) Scan ¶
func (pdb *PogrebDB) Scan(scannerOpt ScannerOptions) error
Scan - iterate over the whole store using the handler function
type ScannerOptions ¶
type ScannerOptions struct { // from where to start Offset string // whether to include the value of the offset in the result or not IncludeOffset bool // the prefix that must be exists in each key in the iteration Prefix string // fetch the values (true) or this is a key only iteration (false) FetchValues bool // the handler that handles the incoming data Handler func(k []byte, v []byte) error }
ScannerOptions - represents the options for a scanner