storage

package
v0.0.0-...-fc663ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV struct {
	// contains filtered or unexported fields
}

func NewKV

func NewKV(name string) (*KV, error)

func (*KV) Backup

func (k *KV) Backup(key string, obj interface{}) error

func (*KV) Close

func (k *KV) Close()

func (*KV) CompactRange

func (k *KV) CompactRange(r util.Range) error

func (*KV) Delete

func (k *KV) Delete(key []byte, wo *opt.WriteOptions) error

func (*KV) Get

func (k *KV) Get(key []byte, ro *opt.ReadOptions) ([]byte, error)

func (*KV) GetByPrefix

func (k *KV) GetByPrefix(pref string) map[string]string

func (*KV) GetRouter

func (k *KV) GetRouter() http.Handler

func (*KV) GetStrValue

func (k *KV) GetStrValue(key string) string

func (*KV) Has

func (k *KV) Has(key []byte, ro *opt.ReadOptions) (bool, error)

func (*KV) HttpGetByPrefix

func (k *KV) HttpGetByPrefix(w http.ResponseWriter, r *http.Request)

func (*KV) HttpGetByPrefixFromPost

func (k *KV) HttpGetByPrefixFromPost(w http.ResponseWriter, r *http.Request)

func (*KV) HttpGetByPrefixQuery

func (k *KV) HttpGetByPrefixQuery(w http.ResponseWriter, r *http.Request)

func (*KV) HttpRemoveKey

func (k *KV) HttpRemoveKey(w http.ResponseWriter, r *http.Request)

func (*KV) NewBatch

func (k *KV) NewBatch() *leveldb.Batch

NewBatch creates a new leveldb write batch

func (*KV) NewIterator

func (k *KV) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator

func (*KV) Put

func (k *KV) Put(key []byte, value []byte, wo *opt.WriteOptions) error

func (*KV) PutStrValue

func (k *KV) PutStrValue(key string, value string)

func (*KV) Range

func (k *KV) Range(start string, limit string) map[string]string

func (*KV) Remove

func (k *KV) Remove(key string) error

func (*KV) Restore

func (k *KV) Restore(key string, obj interface{}) error

func (*KV) Write

func (k *KV) Write(batch *leveldb.Batch, wo *opt.WriteOptions) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL