storage

package
v0.0.0-...-ee38f16 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyStore

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

KeyStore is an wrapper for a Key-Value data store.

func NewKeyStore

func NewKeyStore(path string) *KeyStore

NewKeyStore creates an instance of KeyStore for a given path.

func (*KeyStore) Close

func (ks *KeyStore) Close()

Close closes data store.

func (*KeyStore) Exists

func (ks *KeyStore) Exists(key string) (exists bool, err error)

Exists check if a key is present in the data store.

func (*KeyStore) Get

func (ks *KeyStore) Get(key string) (value string, err error)

Get reads a key from the data store.

func (*KeyStore) Init

func (ks *KeyStore) Init(path string)

Init creates the physical storage files and bucket in the data store.

func (*KeyStore) Save

func (ks *KeyStore) Save(key string, value string) (err error)

Save stores a key value pair in the data store.

Jump to

Keyboard shortcuts

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