store

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ItemMeta added in v0.6.0

type ItemMeta struct {
	Meta map[string]string `json:"meta"`
}

ItemMeta contains metadata for an item in storage

type NotFound

type NotFound string

NotFound indicates an object does not exist

func (NotFound) Error

func (e NotFound) Error() string

type Store

type Store interface {

	// Get an item from the Store
	Get(ctx context.Context, key, dst string) error

	// Put an item in the Store
	Put(ctx context.Context, key, src string, meta map[string]string) error

	// Head checks if the item exists in the store
	Head(ctx context.Context, key string) (ItemMeta, error)
}

Store is an interface to Get and Put items into storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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