kv

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound ...
	ErrNotFound = errors.New("not found")
	ErrEmpty    = errors.New("empty")
	ErrExists   = errors.New("already exists")
)

Functions

This section is empty.

Types

type Store

type Store interface {
	Store(string, []byte) error
	Get(string) ([]byte, error)
	List() ([]string, error)
}

Store ...

func NewDiskStorage

func NewDiskStorage(path string) (Store, error)

NewDiskStorage creates a new diskStore struct with the given path the files that will be generated from this struct are stored in the path

func NewMemory

func NewMemory() Store

NewMemory constrcuts an in-memory key-valye store

Jump to

Keyboard shortcuts

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