backend

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	io.Closer

	// Name returns the name of the backend
	Name() string

	// URL returns the backend destination URL. The scheme, host (bucket/name),
	// and path (prefix/directory) identify the storage location. Query
	// parameters carry useful non-credential details: region, endpoint, anonymous.
	URL() *url.URL

	// Create object in the backend
	CreateObject(context.Context, schema.CreateObjectRequest) (*schema.Object, error)

	// Get object metadata from the backend
	GetObject(context.Context, schema.GetObjectRequest) (*schema.Object, error)

	// Read object content from the backend. Caller must close the returned reader.
	ReadObject(context.Context, schema.GetObjectRequest) (io.ReadCloser, *schema.Object, error)

	// Iterate through the list of objects in the backend, until io.EOF is returned.
	ListObjects(context.Context, *schema.ObjectListIterator) error

	// Delete objects in the backend (single object or prefix)
	DeleteObjects(context.Context, schema.DeleteObjectsRequest) error
}

Backend is the interface for a storage backend.

type DecryptCredentailFunc added in v0.2.20

type DecryptCredentailFunc func(context.Context, string) (json.RawMessage, error)

DecryptCredentailFunc is a function that decrypts a credential with the given key string and returns the decrypted value or an error.

Directories

Path Synopsis
s3

Jump to

Keyboard shortcuts

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