kvstore

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKVStore

func NewKVStore(db database.Database) store.Store

NewKVStore create a new instance of KVStore.

Types

type KVStore

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

KVStore a Database wrapped object.

func (*KVStore) Delete

func (store *KVStore) Delete(key common.Bytes) error

Delete deletes key entry from DB

func (*KVStore) Get

func (store *KVStore) Get(key common.Bytes, value interface{}) error

Get looks up DB with key and returns result into value (passed by reference)

func (*KVStore) Put

func (store *KVStore) Put(key common.Bytes, value interface{}) error

Put upserts key/value into DB

Jump to

Keyboard shortcuts

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