store

package module
v0.0.0-...-e2dbcd3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0 Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilLevelDB = errors.New("store/leveldb_store.go db is nil")
)

Functions

func BytesToObject

func BytesToObject(value []byte, object interface{}) error

func MD5

func MD5(text string) string

func ObjectToBytes

func ObjectToBytes(object interface{}) ([]byte, error)

Types

type LevelStore

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

func NewLevelStore

func NewLevelStore(dir string) (*LevelStore, error)

func ReadOnlyStore

func ReadOnlyStore(dir string) (*LevelStore, error)

func (*LevelStore) Close

func (self *LevelStore) Close() error

func (*LevelStore) DB

func (self *LevelStore) DB() *leveldb.DB

func (*LevelStore) Delete

func (self *LevelStore) Delete(key string) error

func (*LevelStore) Drop

func (self *LevelStore) Drop() error

func (*LevelStore) ForEach

func (self *LevelStore) ForEach(slice *util.Range,
	callback func(key, value []byte) (bool, error)) (callbackErr error)

func (*LevelStore) Get

func (self *LevelStore) Get(key string) ([]byte, error)

func (*LevelStore) Has

func (self *LevelStore) Has(key string) (bool, error)

func (*LevelStore) Put

func (self *LevelStore) Put(key string, value []byte) error

Jump to

Keyboard shortcuts

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