Versions in this module Expand all Collapse all v0 v0.2.0 Mar 13, 2019 v0.1.0 Jul 23, 2018 Changes in this version + var ErrInvalidBatch = errors.New("batch is invalid") + var ErrInvalidTransaction = errors.New("transaction is invalid") + var ErrNotFound = errors.New("key does not exist") + type Batch interface + Delete func(key []byte) + Put func(key, value []byte) + type Batcher interface + Batch func() Batch + Write func(Batch) error + type DB interface + Close func() error + func NewFileDB(filename string, o *opt.Options) (DB, error) + func NewLevelDB(ldb *leveldb.DB) DB + func NewMemDB(o *opt.Options) (DB, error) + type Diff struct + func NewDiff(db ReadWriteBatcher) *Diff + func (d *Diff) Apply() error + func (d *Diff) Delete(key []byte) error + func (d *Diff) Get(key []byte) ([]byte, error) + func (d *Diff) Put(key, value []byte) error + func (d *Diff) Reset() + type Iterator interface + Key func() []byte + Next func() (bool, error) + Release func() + Value func() []byte + type Ranger interface + IteratePrefix func(prefix []byte) Iterator + IterateRange func(start, stop []byte) Iterator + type ReadWriteBatcher interface + type ReadWriter interface + type Reader interface + Get func(key []byte) ([]byte, error) + type Transaction interface + Commit func() error + Discard func() + type Transactor interface + Transaction func() (Transaction, error) + type Writer interface + Delete func(key []byte) error + Put func(key, value []byte) error