Versions in this module Expand all Collapse all v1 v1.8.21 Jan 15, 2019 Changes in this version + type DB struct + func NewDB(path string, metricsPrefix 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) Count() (count int, err error) + func (f Index) CountFrom(start Item) (count int, err error) + func (f Index) Delete(keyFields Item) (err error) + func (f Index) DeleteInBatch(batch *leveldb.Batch, keyFields Item) (err error) + func (f Index) Get(keyFields Item) (out Item, err error) + func (f Index) Iterate(fn IndexIterFunc, options *IterateOptions) (err error) + func (f Index) Put(i Item) (err error) + func (f Index) PutInBatch(batch *leveldb.Batch, i Item) (err error) + type IndexFuncs struct + DecodeKey func(key []byte) (e Item, err error) + DecodeValue func(keyFields Item, value []byte) (e Item, err error) + EncodeKey func(fields Item) (key []byte, err error) + EncodeValue func(fields Item) (value []byte, err error) + type IndexIterFunc func(item Item) (stop bool, err error) + type Item struct + AccessTimestamp int64 + Address []byte + Data []byte + StoreTimestamp int64 + UseMockStore *bool + func (i Item) Merge(i2 Item) (new Item) + type IterateOptions struct + Prefix []byte + SkipStartFromItem bool + StartFrom *Item + 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) Dec() (val uint64, err error) + func (f Uint64Field) DecInBatch(batch *leveldb.Batch) (val uint64, err error) + 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)