database

package
v0.0.0-...-4d07d55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2019 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBcache

type DBcache struct {
	Name          string
	DataDir       string
	ExpTime       time.Duration
	CleanInterval time.Duration
	DB            *cache.Cache
	Logger        shared.LoggerInterface
}

func (*DBcache) Batch

func (db *DBcache) Batch([]shared.DBPatch) error

func (*DBcache) Close

func (db *DBcache) Close() error

func (*DBcache) Delete

func (db *DBcache) Delete(key string) error

func (*DBcache) Export

func (db *DBcache) Export(des string) error

func (*DBcache) Get

func (db *DBcache) Get(key string) (interface{}, int, error)

func (*DBcache) Init

func (db *DBcache) Init(dbname string, dbpath string) error

func (*DBcache) Load

func (db *DBcache) Load(src string) error

func (*DBcache) Put

func (db *DBcache) Put(key string, value interface{}, timeout int, overwrite bool) error

type DBpersistent

type DBpersistent struct {
	Name    string
	DataDir string
	DB      *badger.DB
	Logger  shared.LoggerInterface
}

func (*DBpersistent) Batch

func (db *DBpersistent) Batch([]shared.DBPatch) error

func (*DBpersistent) Close

func (db *DBpersistent) Close() error

func (*DBpersistent) Delete

func (db *DBpersistent) Delete(key string) error

func (*DBpersistent) Export

func (db *DBpersistent) Export(path string) error

func (*DBpersistent) Get

func (db *DBpersistent) Get(key string) ([]byte, error)

func (*DBpersistent) Init

func (db *DBpersistent) Init(dbname string, dbpath string) error

func (*DBpersistent) Put

func (db *DBpersistent) Put(key string, value []byte, overwrite bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL