Versions in this module Expand all Collapse all v1 v1.2.0-rc1 Apr 3, 2018 v1.1.0 Sep 22, 2017 Changes in this version + var ErrBucketExists = errors.New("bucket already exists") + var ErrBucketNameRequired = errors.New("bucket name required") + var ErrBucketNotFound = errors.New("bucket not found") + var ErrDbAlreadyOpen = errors.New("database already open") + var ErrDbDoesNotExist = errors.New("database does not exist") + var ErrDbExists = errors.New("database already exists") + var ErrDbNotOpen = errors.New("database not open") + var ErrDbTypeRegistered = errors.New("database type already registered") + var ErrDbUnknownType = errors.New("unknown database type") + var ErrIncompatibleValue = errors.New("incompatible value") + var ErrInvalid = errors.New("invalid database") + var ErrKeyRequired = errors.New("key required") + var ErrKeyTooLarge = errors.New("key too large") + var ErrTxClosed = errors.New("tx closed") + var ErrTxNotWritable = errors.New("tx not writable") + var ErrValueTooLarge = errors.New("value too large") + func BucketIsEmpty(bucket ReadBucket) bool + func RegisterDriver(driver Driver) error + func SupportedDrivers() []string + func Update(db DB, f func(tx ReadWriteTx) error) error + func View(db DB, f func(tx ReadTx) error) error + type DB interface + BeginReadTx func() (ReadTx, error) + BeginReadWriteTx func() (ReadWriteTx, error) + Close func() error + Copy func(w io.Writer) error + func Create(dbType string, args ...interface{}) (DB, error) + func Open(dbType string, args ...interface{}) (DB, error) + type Driver struct + Create func(args ...interface{}) (DB, error) + DbType string + Open func(args ...interface{}) (DB, error) + type ReadBucket interface + ForEach func(func(k, v []byte) error) error + Get func(key []byte) []byte + NestedReadBucket func(key []byte) ReadBucket + ReadCursor func() ReadCursor + type ReadCursor interface + First func() (key, value []byte) + Last func() (key, value []byte) + Next func() (key, value []byte) + Prev func() (key, value []byte) + Seek func(seek []byte) (key, value []byte) + type ReadTx interface + ReadBucket func(key []byte) ReadBucket + Rollback func() error + type ReadWriteBucket interface + CreateBucket func(key []byte) (ReadWriteBucket, error) + CreateBucketIfNotExists func(key []byte) (ReadWriteBucket, error) + Delete func(key []byte) error + DeleteNestedBucket func(key []byte) error + NestedReadWriteBucket func(key []byte) ReadWriteBucket + Put func(key, value []byte) error + ReadWriteCursor func() ReadWriteCursor + type ReadWriteCursor interface + Delete func() error + type ReadWriteTx interface + Commit func() error + CreateTopLevelBucket func(key []byte) (ReadWriteBucket, error) + DeleteTopLevelBucket func(key []byte) error + ReadWriteBucket func(key []byte) ReadWriteBucket