storage

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(collection string, key string) error

Delete returns one entry

func GetKeys added in v1.2.0

func GetKeys(collection string) ([]string, error)

GetKeys will return the (json) strings of a collection

func InitStorage

func InitStorage(path string) error

InitStorage registers a local directory as JSON file storage

func NewRedisStorage added in v1.2.0

func NewRedisStorage(client *redis.Client) storage

func Read

func Read(collection string, key string, v interface{}) error

Read will load the stored data for one entry (using reference) to avoid allocation

func SetStorage added in v1.2.0

func SetStorage(storage storage)

SetStorage provide storage to persist data for bot usage

func Write

func Write(collection string, key string, v interface{}) error

Write stores one value in the persistent storage

Types

This section is empty.

Jump to

Keyboard shortcuts

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