handler

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlobDeleteHandler

type BlobDeleteHandler interface {
	// Delete the blob contents.
	Delete(ctx context.Context, repo string, h v1.Hash) error
}

type BlobHandler

type BlobHandler interface {
	// Get gets the Blob contents, or errNotFound if the Blob wasn't found.
	Get(ctx context.Context, repo string, h v1.Hash) (io.ReadCloser, error)
}

BlobHandler represents a minimal Blob storage backend, capable of serving Blob contents.

type BlobPutHandler

type BlobPutHandler interface {
	// Put puts the Blob contents.
	//
	// The contents will be verified against the expected size and digest
	// as the contents are read, and an error will be returned if these
	// don't match. Implementations should return that error, or a wrapper
	// around that error, to return the correct error when these don't match.
	Put(ctx context.Context, repo string, h v1.Hash, rc io.ReadCloser) error
}

BlobPutHandler is an extension interface representing a Blob storage backend that can write Blob contents.

type BlobStatHandler

type BlobStatHandler interface {
	// Stat returns the size of the Blob, or errNotFound if the Blob wasn't
	// found, or redirectError if the Blob can be found elsewhere.
	Stat(ctx context.Context, repo string, h v1.Hash) (int64, error)
}

BlobStatHandler is an extension interface representing a Blob storage backend that can serve metadata about blobs.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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