kv

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options basedb.Options) (basedb.IDb, error)

New create new instance of Badger db

Types

type BadgerDb

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

BadgerDb struct

func (*BadgerDb) Close

func (b *BadgerDb) Close()

Close close db

func (*BadgerDb) Get

func (b *BadgerDb) Get(prefix []byte, key []byte) (basedb.Obj, error)

Get return value for specified key

func (*BadgerDb) GetAllByCollection

func (b *BadgerDb) GetAllByCollection(prefix []byte) ([]basedb.Obj, error)

GetAllByCollection return all array of Obj for all keys under specified prefix(bucket)

func (*BadgerDb) Set

func (b *BadgerDb) Set(prefix []byte, key []byte, value []byte) error

Set save value with key to storage

Jump to

Keyboard shortcuts

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