Versions in this module Expand all Collapse all v1 v1.8.19 Nov 28, 2018 Changes in this version + type DB struct + func NewDB(path string) (db *DB, err error) + func (db *DB) Close() (err error) + func (db *DB) Delete(key []byte) (err error) + func (db *DB) Get(key []byte) (value []byte, err error) + func (db *DB) NewIndex(name string, funcs IndexFuncs) (f Index, err error) + func (db *DB) NewIterator() iterator.Iterator + func (db *DB) NewStringField(name string) (f StringField, err error) + func (db *DB) NewStructField(name string) (f StructField, err error) + func (db *DB) NewUint64Field(name string) (f Uint64Field, err error) + func (db *DB) Put(key []byte, value []byte) (err error) + func (db *DB) WriteBatch(batch *leveldb.Batch) (err error) + type Index struct + func (f Index) Delete(keyFields IndexItem) (err error) + func (f Index) DeleteInBatch(batch *leveldb.Batch, keyFields IndexItem) (err error) + func (f Index) Get(keyFields IndexItem) (out IndexItem, err error) + func (f Index) IterateAll(fn IndexIterFunc) (err error) + func (f Index) IterateFrom(start IndexItem, fn IndexIterFunc) (err error) + func (f Index) Put(i IndexItem) (err error) + func (f Index) PutInBatch(batch *leveldb.Batch, i IndexItem) (err error) + type IndexFuncs struct + DecodeKey func(key []byte) (e IndexItem, err error) + DecodeValue func(value []byte) (e IndexItem, err error) + EncodeKey func(fields IndexItem) (key []byte, err error) + EncodeValue func(fields IndexItem) (value []byte, err error) + type IndexItem struct + AccessTimestamp int64 + Address []byte + Data []byte + StoreTimestamp int64 + UseMockStore *bool + func (i IndexItem) Merge(i2 IndexItem) (new IndexItem) + type IndexIterFunc func(item IndexItem) (stop bool, err error) + type StringField struct + func (f StringField) Get() (val string, err error) + func (f StringField) Put(val string) (err error) + func (f StringField) PutInBatch(batch *leveldb.Batch, val string) + type StructField struct + func (f StructField) Get(val interface{}) (err error) + func (f StructField) Put(val interface{}) (err error) + func (f StructField) PutInBatch(batch *leveldb.Batch, val interface{}) (err error) + type Uint64Field struct + func (f Uint64Field) Get() (val uint64, err error) + func (f Uint64Field) Inc() (val uint64, err error) + func (f Uint64Field) IncInBatch(batch *leveldb.Batch) (val uint64, err error) + func (f Uint64Field) Put(val uint64) (err error) + func (f Uint64Field) PutInBatch(batch *leveldb.Batch, val uint64)