Documentation ¶
Overview ¶
Package 'kvlite' provides a Key Value interface upon SQLite.
Index ¶
- Constants
- Variables
- func Lock(filepath, passphrase string, padlock []byte) (err error)
- func Unlock(filepath, passphrase string) (err error)
- type Store
- func (s *Store) Close() error
- func (s *Store) CountKeys(table string, filters ...string) (count uint32, err error)
- func (s *Store) CryptKey(key []byte)
- func (s *Store) CryptReset() error
- func (s *Store) CryptSet(table string, key interface{}, val interface{}) (err error)
- func (s *Store) Get(table string, key interface{}, output interface{}) (found bool, err error)
- func (s *Store) ListKeys(table string, filters ...string) (keyList []string, err error)
- func (s *Store) ListNKeys(table string, filters ...string) (keyList []int, err error)
- func (s *Store) ListTables(filters ...string) (cList []string, err error)
- func (s *Store) SGet(table string, key interface{}) (output string)
- func (s *Store) Set(table string, key interface{}, val interface{}) (err error)
- func (s *Store) Shrink() (err error)
- func (s *Store) Truncate(table string) (err error)
- func (s *Store) Unset(table string, key interface{}) error
Constants ¶
View Source
const ( RESERVED = "KVLite" NONE = "" )
Variables ¶
View Source
var ErrBadPadlock = errors.New("kvlite: Invalid padlock provided, unable to open database.")
ErrBadPadlock is returned if kvlite.Open is used with incorrect padlock set on database.
View Source
var ErrBadPass = errors.New("kvlite: Invalid passphrase provided, unable to remove lock!")
ErrBadPass is returned if an Unlock is attempted with the incorrect passphrase.
View Source
var ErrNotUnlocked = errors.New("kvlite: Cannot apply new lock on top of existing lock, must remove old lock first.")
ErrLocked is returned if a new Lock is attempted on a database that is currently locked.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func FastOpen ¶
Open Database without auto-generated encryption key, instead specify key, if no key specific will be random.
func (*Store) CryptReset ¶
Truncates the KVLite table to reset the encryption keys for database.
func (*Store) ListTables ¶
List all tables, if filter specified only tables that match filter.
Click to show internal directories.
Click to hide internal directories.