leveldb

package
v0.0.0-...-9272cde Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

func RemoveDir

func RemoveDir(dir string) error

Types

type GomaDB

type GomaDB struct {
	sync.Mutex
	Store *leveldb.DB
}
var DB *GomaDB

func InitDB

func InitDB(path string) (*GomaDB, error)

func RecoverDB

func RecoverDB(path string) (*GomaDB, error)

func (*GomaDB) Delete

func (db *GomaDB) Delete(key string) error

func (*GomaDB) Get

func (db *GomaDB) Get(key string) (string, error)

func (*GomaDB) GetBytes

func (db *GomaDB) GetBytes(key string) ([]byte, error)

func (*GomaDB) Put

func (db *GomaDB) Put(key string, value string) error

func (*GomaDB) PutBytes

func (db *GomaDB) PutBytes(key string, data []byte) error

Jump to

Keyboard shortcuts

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