docstore

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRequestNotFound is returned when a request is not found
	ErrRequestNotFound = fmt.Errorf("key not found")
)

Functions

func ValidKey added in v0.9.0

func ValidKey(key string) error

ValidKey returns an error if the key is invalid.

Types

type Deleter added in v0.11.0

type Deleter interface {
	// Put stores the document.
	Delete(ctx context.Context, key string) error
}

Deleter deletes documents.

type DocStore

type DocStore interface {
	Getter
	Putter
	Deleter
}

DocStore provides document services.

type Getter

type Getter interface {
	// Get retrieves the document.
	Get(ctx context.Context, key string) ([]byte, error)
}

Getter gets documents.

type Putter

type Putter interface {
	// Put stores the document.
	Put(ctx context.Context, key string, body []byte) error
}

Putter stores documents.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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