storage

package
v0.0.0-...-26835a4 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStorage

type MemoryStorage map[string]interface{}

MemoryStorage is the in memory storage implementation

func (*MemoryStorage) Get

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

Get returns value from key

func (*MemoryStorage) Set

func (s *MemoryStorage) Set(key string, val interface{}) error

Set saves the key and value

type Storage

type Storage interface {
	Get(key string) (interface{}, error)
	Set(key string, value interface{}) error
}

Storage defines the interface which the bots will use to get/set their informations

func NewStorage

func NewStorage(config *viper.Viper) (Storage, error)

NewStorage creates the storage with given config

Jump to

Keyboard shortcuts

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