Documentation ¶
Index ¶
- func BatchRemove(st *Storage, r *leveldbutil.Range, limit int) (int, error)
- func HashPrefix(b []byte) []byte
- func RemoveByPrefix(st *Storage, prefix []byte) error
- type PrefixStorage
- func (st *PrefixStorage) Batch(batch *PrefixStorageBatch, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) Close() error
- func (st *PrefixStorage) Delete(key []byte, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) Exists(key []byte) (bool, error)
- func (st *PrefixStorage) Get(key []byte) ([]byte, bool, error)
- func (st *PrefixStorage) Iter(r *leveldbutil.Range, callback func([]byte, []byte) (bool, error), sort bool) error
- func (st *PrefixStorage) NewBatch() *PrefixStorageBatch
- func (st *PrefixStorage) Prefix() []byte
- func (st *PrefixStorage) Put(key, b []byte, opt *leveldbOpt.WriteOptions) error
- func (st *PrefixStorage) RawStorage() *Storage
- func (st *PrefixStorage) Remove() error
- type PrefixStorageBatch
- type Storage
- func (st *Storage) Batch(batch *leveldb.Batch, wo *leveldbOpt.WriteOptions) error
- func (st *Storage) Clean() error
- func (st *Storage) Close() error
- func (st *Storage) DB() *leveldb.DB
- func (st *Storage) Delete(k []byte, opt *leveldbOpt.WriteOptions) error
- func (st *Storage) Exists(key []byte) (bool, error)
- func (st *Storage) Get(key []byte) ([]byte, bool, error)
- func (st *Storage) Iter(r *leveldbutil.Range, callback func(key []byte, raw []byte) (bool, error), ...) error
- func (st *Storage) Put(k, b []byte, opt *leveldbOpt.WriteOptions) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchRemove ¶
func HashPrefix ¶
func RemoveByPrefix ¶
Types ¶
type PrefixStorage ¶
func NewPrefixStorage ¶
func NewPrefixStorage(st *Storage, prefix []byte) *PrefixStorage
func (*PrefixStorage) Batch ¶
func (st *PrefixStorage) Batch(batch *PrefixStorageBatch, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) Close ¶
func (st *PrefixStorage) Close() error
func (*PrefixStorage) Delete ¶
func (st *PrefixStorage) Delete(key []byte, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) Iter ¶
func (st *PrefixStorage) Iter( r *leveldbutil.Range, callback func([]byte, []byte) (bool, error), sort bool, ) error
func (*PrefixStorage) NewBatch ¶
func (st *PrefixStorage) NewBatch() *PrefixStorageBatch
func (*PrefixStorage) Prefix ¶
func (st *PrefixStorage) Prefix() []byte
func (*PrefixStorage) Put ¶
func (st *PrefixStorage) Put(key, b []byte, opt *leveldbOpt.WriteOptions) error
func (*PrefixStorage) RawStorage ¶
func (st *PrefixStorage) RawStorage() *Storage
func (*PrefixStorage) Remove ¶
func (st *PrefixStorage) Remove() error
type PrefixStorageBatch ¶
func (*PrefixStorageBatch) Delete ¶
func (b *PrefixStorageBatch) Delete(key []byte)
func (*PrefixStorageBatch) Put ¶
func (b *PrefixStorageBatch) Put(key, i []byte)
type Storage ¶
func NewStorage ¶
func NewStorage(str leveldbStorage.Storage, opt *leveldbOpt.Options) (*Storage, error)
func (*Storage) Batch ¶
func (st *Storage) Batch(batch *leveldb.Batch, wo *leveldbOpt.WriteOptions) error
func (*Storage) Delete ¶
func (st *Storage) Delete(k []byte, opt *leveldbOpt.WriteOptions) error
func (*Storage) Put ¶
func (st *Storage) Put(k, b []byte, opt *leveldbOpt.WriteOptions) error
Click to show internal directories.
Click to hide internal directories.