state

package
v0.0.0-...-92cc422 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidArgument = errors.New("ErrorInvalidArgument")
View Source
var ErrNotFound = errors.New("ErrorNotFound")

Functions

This section is empty.

Types

type DBStore

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

func NewDBStore

func NewDBStore(path string) (s *DBStore, err error)

func (*DBStore) Close

func (s *DBStore) Close() error

func (*DBStore) Delete

func (s *DBStore) Delete(key string) (err error)

func (*DBStore) Get

func (s *DBStore) Get(key string, i interface{}) (err error)

func (*DBStore) Put

func (s *DBStore) Put(key string, i interface{}) (err error)

type InmemoryStore

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

func NewInmemoryStore

func NewInmemoryStore() *InmemoryStore

func (*InmemoryStore) Close

func (s *InmemoryStore) Close() error

func (*InmemoryStore) Delete

func (s *InmemoryStore) Delete(key string) (err error)

func (*InmemoryStore) Get

func (s *InmemoryStore) Get(key string, i interface{}) (err error)

func (*InmemoryStore) Put

func (s *InmemoryStore) Put(key string, i interface{}) (err error)

type Store

type Store interface {
	Get(key string, i interface{}) (err error)
	Put(key string, i interface{}) (err error)
	Delete(key string) (err error)
	Close() error
}

Jump to

Keyboard shortcuts

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