store

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BadgerFileName = "db"
View Source
const DefaultRootDir = "~/.fleek-space"

Variables

This section is empty.

Functions

func New

func New(opts ...Option) *store

Types

type Option

type Option func(o *storeOptions)

func WithPath

func WithPath(path string) Option

Helper function for setting store path

type Store

type Store interface {
	Open() error
	Close() error
	Set(key []byte, value []byte) error
	SetString(key string, value string) error
	Get(key []byte) ([]byte, error)
	Remove(key []byte) error
	DropAll() error
	IsOpen() bool
	KeysWithPrefix(prefix string) ([]string, error)
}

Jump to

Keyboard shortcuts

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