localdb

package
v0.0.0-...-5ee79ad Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDBLocation string = "/badger/data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalDB

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

func GetHandle

func GetHandle() (*LocalDB, error)

func GetHandleFromLocation

func GetHandleFromLocation(dbLocation string) (*LocalDB, error)

func (*LocalDB) Close

func (l *LocalDB) Close()

func (*LocalDB) ListKeys

func (l *LocalDB) ListKeys() []string

func (*LocalDB) MultiWrite

func (l *LocalDB) MultiWrite(multiData map[string][]byte) error

func (*LocalDB) NewSeq

func (l *LocalDB) NewSeq(memberName string) error

func (*LocalDB) NextSeq

func (l *LocalDB) NextSeq(memberName string) (uint64, error)

func (*LocalDB) Read

func (l *LocalDB) Read(key string) ([]byte, error)

func (*LocalDB) Remove

func (l *LocalDB) Remove(key string) error

func (*LocalDB) Write

func (l *LocalDB) Write(key string, data []byte) error

Jump to

Keyboard shortcuts

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