lvldb

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is a goleveldb instance wrapper.

func NewDatabase

func NewDatabase(path string, cache, handles int) (*Database, error)

NewDatabase creates a new leveldb database.

func (*Database) Close

func (db *Database) Close() error

Close the internal database.

func (*Database) Delete

func (db *Database) Delete(key []byte) error

Delete a key/value.

func (*Database) Get

func (db *Database) Get(key []byte) ([]byte, error)

Get a value via the key.

func (*Database) Has

func (db *Database) Has(key []byte) (bool, error)

Has checks if a key exists in the database.

func (*Database) Path

func (db *Database) Path() string

Path returns the location of the database.

func (*Database) Put

func (db *Database) Put(key, value []byte) error

Put a key/value.

Jump to

Keyboard shortcuts

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