leveldbstore

package
v0.2.0-rc2 Latest Latest
Warning

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

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

Documentation

Overview

Package leveldbstore implements a simple key-value local store. It's efficient and can be used by stores to save key-value pairs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Path where key-value pairs will be saved.
	Path string
}

Config contains configuration options for the store.

type LevelDBStore

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

LevelDBStore implements github.com/stratumn/sdk/store.KeyValueStore.

func New

func New(config *Config) (*LevelDBStore, error)

New creates an instance of a LevelDBStore.

func (*LevelDBStore) DeleteValue

func (a *LevelDBStore) DeleteValue(key []byte) ([]byte, error)

DeleteValue implements github.com/stratumn/sdk/store.KeyValueStore.DeleteValue.

func (*LevelDBStore) GetValue

func (a *LevelDBStore) GetValue(key []byte) ([]byte, error)

GetValue implements github.com/stratumn/sdk/store.KeyValueStore.GetValue.

func (*LevelDBStore) SetValue

func (a *LevelDBStore) SetValue(key []byte, value []byte) error

SetValue implements github.com/stratumn/sdk/store.KeyValueStore.SetValue.

Jump to

Keyboard shortcuts

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