Versions in this module Expand all Collapse all v0 v0.1.2 Jan 7, 2022 Changes in this version + const DEBUG + const ERROR + const INFO + const WARNING + type Iterator interface + Close func() + Key func() []byte + Next func() bool + Val func() []byte + type Storage struct + func New(pathname string) *Storage + func NewByVersion(pathname string, version uint32) (*Storage, error) + func (storage *Storage) Close() error + func (storage *Storage) CommitWriteBatch(batch *StorageWriteBatch) error + func (storage *Storage) Del(key string) error + func (storage *Storage) DelData(key []byte) error + func (storage *Storage) For(fn func(k []byte, v []byte)) + func (storage *Storage) ForIndex(fn func(n int, k []byte, v []byte)) + func (storage *Storage) ForIndexStar(start int, fn func(n int, k []byte, v []byte)) + func (storage *Storage) Foreach(fn func(k string, v []byte) error) error + func (storage *Storage) ForeachData(fn func(k []byte, v []byte) error) error + func (storage *Storage) Get(key string) ([]byte, error) + func (storage *Storage) GetData(key []byte) (val []byte, err error) + func (storage *Storage) GetVersion() uint32 + func (storage *Storage) NewIterator() Iterator + func (storage *Storage) NewWriteBatch() *StorageWriteBatch + func (storage *Storage) PrefixForeach(prefix string, fn func(k string, v []byte) error) error + func (storage *Storage) PrefixForeachData(prefix []byte, fn func(k []byte, v []byte) error) error + func (storage *Storage) Set(key string, val []byte) error + func (storage *Storage) SetData(key []byte, val []byte) error + type StorageWriteBatch struct + func (b *StorageWriteBatch) Clear() + func (b *StorageWriteBatch) Count() int + func (b *StorageWriteBatch) Delete(key []byte) error + func (b *StorageWriteBatch) Destroy() + func (b *StorageWriteBatch) Put(key, value []byte) error