Versions in this module Expand all Collapse all v0 v0.0.3 Dec 20, 2021 Changes in this version + var ErrNoResults = errors.New("could not find any results") + func BytesToUint64(b []byte) uint64 + func NewDiskStorage(dataPath string) *diskStorage + func Uint64ToBytes(i uint64) []byte + type KeyValue struct + Key []byte + Value []byte + type Storage interface + Close func() + Contains func(key []byte) bool + CountPrefix func(prefix []byte) (uint64, error) + CountRange func(from []byte, to []byte) (uint64, error) + Get func(key []byte) ([]byte, error) + GetFirst func(count int) ([][]byte, error) + GetRange func(from []byte, to []byte) ([][]byte, error) + Increment func(key []byte) (uint64, error) + Iterate func(prefix []byte, f func([]byte, func() ([]byte, error)) (bool, error)) error + IterateReverse func(prefix []byte, f func([]byte, func() ([]byte, error)) (bool, error)) error + Seek func(key []byte) (KeyValue, error) + Set func(key []byte, value []byte) error + SetBatch func(batch []KeyValue) error + TotalCount func() (uint64, error) + type StorageGenerator func(string) Storage + func NewDiskStorageGenerator() StorageGenerator