storage

package
v0.0.0-...-f99419a Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage interface {
	// Put sets the value for a key.
	Put(key string, obj interface{})

	// Get returns the value stored in the map for a key, or nil if no value is present.
	// The ok result indicates whether value was found in the map.
	Get(key string) (obj interface{}, exists bool)

	// Update sets the value for a key.
	Update(key string, obj interface{})

	// Delete deletes the value for a key.
	Delete(key string)

	// List returns a list of all the objects.
	List() []interface{}

	// ListKeys returns a list of all the keys associated with objects.
	ListKeys() []string
}

func NewMemoryStorage

func NewMemoryStorage(name string) Storage

NewMemoryStorage returns an in-memory storage.

Jump to

Keyboard shortcuts

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