store

package
v0.0.0-...-2c3712b Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func NewStore

func NewStore(cfg *config.Config, log *logrus.Logger) (*Store, error)

func (*Store) Close

func (s *Store) Close() error

func (*Store) Connect

func (s *Store) Connect() error

func (*Store) Flush

func (s *Store) Flush() error

func (*Store) FromGobToItem

func (_ *Store) FromGobToItem(b []byte, item interface{}) (interface{}, error)

Item deserializing

func (*Store) FromJSONToItem

func (_ *Store) FromJSONToItem(b []byte, item interface{}) (interface{}, error)

func (*Store) Get

func (s *Store) Get(key string, item interface{}) (interface{}, error)

func (*Store) GetAll

func (s *Store) GetAll(pattern string, emptyRecordFunc config.EmptyRecordFunc) ([]interface{}, error)

func (*Store) ItemToGob

func (_ *Store) ItemToGob(item interface{}) ([]byte, error)

Item serializing

func (*Store) ItemToJSON

func (_ *Store) ItemToJSON(item interface{}) ([]byte, error)

func (*Store) Remove

func (s *Store) Remove(key string) error

func (*Store) Set

func (s *Store) Set(key string, item interface{}) error

Jump to

Keyboard shortcuts

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