storage

package
v0.0.0-...-ffe2c35 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func GetItemJSON

func GetItemJSON(s Storage, key string, dst interface{}) error

func SetItemJSON

func SetItemJSON(s Storage, key string, val interface{}) error

Types

type Storage

type Storage interface {
	// Length returns an integer representing the number of data items stored in the Storage object.
	Length() int
	// Key will return the name of the nth key in the storage.
	Key(ind int) string
	// GetItem will return that key's value.
	GetItem(key string) (string, bool)
	// SetItem will add that key to the storage, or update that key's value if it already exists.
	SetItem(key, val string)
	// RemoveItem will remove that key from the storage.
	RemoveItem(key string)
	// Clear will empty all keys out of the storage.
	Clear()
}

func Local

func Local() Storage

func Session

func Session() Storage

Jump to

Keyboard shortcuts

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