Documentation ¶
Index ¶
- Constants
- type BoltDB
- func (db *BoltDB) Add(key string, value string, args ...interface{}) error
- func (db *BoltDB) AddBucket(bucketName string) error
- func (db *BoltDB) CloseDB()
- func (db *BoltDB) Conn() interface{}
- func (db *BoltDB) Delete(key string) error
- func (db *BoltDB) DeleteBucket(bucketName string) error
- func (db *BoltDB) Get(key string) (string, error)
- func (db *BoltDB) GetDefBucket() string
- func (db *BoltDB) List(args ...interface{}) (data []KeyValuePair, err error)
- func (db *BoltDB) ListBuckets() (data []string, err error)
- func (db *BoltDB) SetBucket(bucketName string)
- type BuntDB
- func (db *BuntDB) Add(key string, value string, args ...interface{}) error
- func (db *BuntDB) CloseDB()
- func (db *BuntDB) Conn() interface{}
- func (db *BuntDB) Delete(key string) error
- func (db *BuntDB) Get(key string) (string, error)
- func (db *BuntDB) List(args ...interface{}) (data []KeyValuePair, err error)
- type DB
- type DBType
- type KeyValuePair
Constants ¶
View Source
const ( // BOLT_DB - BoltDB BOLT_DB = "boltdb" // BUNT_DB - BuntDB BUNT_DB = "buntdb" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDB ¶
BoltDB - BoltDB struct
func (*BoltDB) Conn ¶ added in v0.2.0
func (db *BoltDB) Conn() interface{}
Conn godoc - Returns the underlying database connection
func (*BoltDB) DeleteBucket ¶ added in v0.2.0
DeleteBucket godoc - Deletes a bucket from the database
func (*BoltDB) GetDefBucket ¶ added in v0.2.0
SetBucket godoc - Sets the current bucket
func (*BoltDB) List ¶
func (db *BoltDB) List(args ...interface{}) (data []KeyValuePair, err error)
List godoc - Lists all key/value pairs in the database
func (*BoltDB) ListBuckets ¶ added in v0.2.0
ListBuckets godoc - Lists all buckets in the database
type BuntDB ¶
BuntDB - BuntDB struct
func (*BuntDB) Conn ¶ added in v0.2.0
func (db *BuntDB) Conn() interface{}
Conn godoc - Returns the underlying database connection
func (*BuntDB) List ¶
func (db *BuntDB) List(args ...interface{}) (data []KeyValuePair, err error)
List godoc - Lists all keys in the database
type DB ¶
type DB interface { Conn() interface{} Add(string, string, ...interface{}) error CloseDB() Get(key string) (string, error) // TODO: add list all keys Delete(string) error List(args ...interface{}) ([]KeyValuePair, error) }
DB interface for underlying database packages
type KeyValuePair ¶
Click to show internal directories.
Click to hide internal directories.