store

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemNotFoundError

type ItemNotFoundError struct{}

ItemNotFoundError is an error returned when a requested item is not present in a Store.

func (*ItemNotFoundError) Error

func (e *ItemNotFoundError) Error() string

type Pool

type Pool interface {
	Get(identifier string) (Store, error)

	Delete(identifier string)
}

Pool is a collection of Stores. The Get method creates a new Store for the given identifier if not already present. Trying to delete a Store via an unknown identifier has no effect.

type Store

type Store interface {
	SetBin(name string, data []byte) error

	GetBin(name string) (out []byte, err error)

	Delete(name string) error
}

Store is a collection of byte arrays. The byte arrays can be stored, retrieved and deleted by name.

Jump to

Keyboard shortcuts

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