db

package
v0.0.0-...-b5034c9 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir returns the path to the directory that contains the database contents. It is always in the same directory as the running binary.

func Exists

func Exists() bool

Exists returns a boolean indicating if the database directory is already initialized

Types

type Database

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

func Open

func Open() (*Database, error)

Open opens a Badger client to the database at Dir()

func (*Database) Close

func (db *Database) Close()

Close closes the Badger client to the database at Dir()

func (*Database) GetEntry

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

func (*Database) SetEntry

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

Jump to

Keyboard shortcuts

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