storagetest

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStore

type MemStore struct {
	sync.Mutex
	Name string
	// contains filtered or unexported fields
}

Common interface for interacting with a simple Key/Value storage

func NewMemStore

func NewMemStore(name string) *MemStore

func (*MemStore) Delete

func (s *MemStore) Delete(key string) error

func (*MemStore) Exists

func (s *MemStore) Exists(key string) (bool, error)

func (*MemStore) Get

func (s *MemStore) Get(key string) (*storage.KeyValue, error)

func (*MemStore) List

func (s *MemStore) List(prefix string) ([]*storage.KeyValue, error)

func (*MemStore) Put

func (s *MemStore) Put(key string, value []byte) error

type TestStore

type TestStore struct{}

func New

func New() TestStore

func (TestStore) Store

func (s TestStore) Store(name string) storage.Interface

Jump to

Keyboard shortcuts

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