serve

package
v0.0.0-...-b2021a0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("repository or commit not found")

Functions

func Blob

func Blob(w http.ResponseWriter, r *http.Request, name string)

func Error

func Error(w http.ResponseWriter, err error)

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(ctx context.Context) (*Storage, error)

func (*Storage) BlobExists

func (s *Storage) BlobExists(ctx context.Context, name string) (v1.Descriptor, error)

func (*Storage) ServeIndex

func (s *Storage) ServeIndex(w http.ResponseWriter, r *http.Request, idx v1.ImageIndex, also ...string) error

ServeIndex writes manifest, config and layer blobs for each image in the index, then writes and redirects to the index manifest contents pointing to those blobs.

func (*Storage) ServeManifest

func (s *Storage) ServeManifest(w http.ResponseWriter, r *http.Request, img v1.Image, also ...string) error

ServeManifest writes config and layer blobs for the image, then writes and redirects to the image manifest contents pointing to those blobs.

func (*Storage) WriteImage

func (s *Storage) WriteImage(ctx context.Context, img v1.Image, also ...string) error

WriteImage writes the layer blobs, config blob and manifest.

func (*Storage) WriteObject

func (s *Storage) WriteObject(ctx context.Context, name, contents string) error

Jump to

Keyboard shortcuts

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