Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadPadlock = errors.New("Invalid padlock provided, unable to open database.")
ErrBadPadlock is returned if kvlite.Open is used with incorrect padlock set on database.
Functions ¶
func CryptReset ¶
Resets encryption key on database, removing all encrypted keys in the process.
Types ¶
type Store ¶
type Store interface {
// Tables provides a list of all tables.
Tables() (tables []string, err error)
// Table creats a key/val direct to a specified Table.
Table(table string) Table
// SubStore Creates a new bucket with a different namespace.
Sub(name string) Store
// Buckets lists all bucket namespaces, limit_depth limits to first-level buckets
Buckets(limit_depth bool) (stores []string, err error)
Shared(name string) Store
// Drop drops the specified table.
Drop(table string) (err error)
// CountKeys provides a total of keys in table.
CountKeys(table string) (count int, err error)
// Keys provides a listing of all keys in table.
Keys(table string) (keys []string, err error)
// CryptSet encrypts the value within the key/value pair in table.
CryptSet(table, key string, value interface{}) (err error)
// Set sets the key/value pair in table.
Set(table, key string, value interface{}) (err error)
// Unset deletes the key/value pair in table.
Unset(table, key string) (err error)
// Get retrieves value at key in table.
Get(table, key string, output interface{}) (found bool, err error)
// Close closes the kvliter.Store.
Close() (err error)
}
Main Store Interface
type Table ¶
type Table interface {
Keys() (keys []string, err error)
CountKeys() (count int, err error)
Set(key string, value interface{}) (err error)
CryptSet(key string, value interface{}) (err error)
Get(key string, value interface{}) (found bool, err error)
Unset(key string) (err error)
Drop() (err error)
}
Table Interface follows the Main Store Interface, but directly to a table.
Click to show internal directories.
Click to hide internal directories.