beskar

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Overview

code copied from https://github.com/distribution/distribution/blob/main/registry/registry.go and modified under Apache-2.0 license

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGC

func RunGC(ctx context.Context, beskarConfig *config.BeskarConfig, dryRun, removeUntagged bool) error

Types

type ManifestEventHandler

type ManifestEventHandler interface {
	Put(context.Context, distribution.Repository, digest.Digest, string, []byte) error
	Delete(context.Context, distribution.Repository, digest.Digest, string, []byte) error
}

type ManifestSink

type ManifestSink struct {
	groupcache.Sink
	// contains filtered or unexported fields
}

func (*ManifestSink) FromManifest

func (ms *ManifestSink) FromManifest(manifest distribution.Manifest) error

func (*ManifestSink) ToManifest

func (ms *ManifestSink) ToManifest() (distribution.Manifest, error)

type Registry

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

func New

func New(beskarConfig *config.BeskarConfig) (context.Context, *Registry, error)

func (*Registry) Delete

func (br *Registry) Delete(ctx context.Context, repository distribution.Repository, dgst digest.Digest, mediaType string, payload []byte) error

func (*Registry) Put

func (br *Registry) Put(ctx context.Context, repository distribution.Repository, dgst digest.Digest, mediaType string, payload []byte) error

func (*Registry) Serve

func (br *Registry) Serve(ctx context.Context, ln net.Listener) (errFn error)

type RegistryMiddleware

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

func (*RegistryMiddleware) BlobStatter

func (m *RegistryMiddleware) BlobStatter() distribution.BlobStatter

BlobStatter returns a BlobStatter to control

func (*RegistryMiddleware) Blobs

func (m *RegistryMiddleware) Blobs() distribution.BlobEnumerator

Blobs returns a blob enumerator to access all blobs

func (*RegistryMiddleware) Repositories

func (m *RegistryMiddleware) Repositories(ctx context.Context, repos []string, last string) (n int, err error)

Repositories fills 'repos' with a lexicographically sorted catalog of repositories up to the size of 'repos' and returns the value 'n' for the number of entries which were filled. 'last' contains an offset in the catalog, and 'err' will be set to io.EOF if there are no more entries to obtain.

func (*RegistryMiddleware) Repository

func (m *RegistryMiddleware) Repository(ctx context.Context, name reference.Named) (distribution.Repository, error)

Repository should return a reference to the named repository. The registry may or may not have the repository but should always return a reference.

func (*RegistryMiddleware) Scope

func (m *RegistryMiddleware) Scope() distribution.Scope

Scope describes the names that can be used with this Namespace. The global namespace will have a scope that matches all names. The scope effectively provides an identity for the namespace.

type RepositoryMiddleware

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

func (*RepositoryMiddleware) Blobs

func (m *RepositoryMiddleware) Blobs(ctx context.Context) distribution.BlobStore

Blobs returns a reference to this repository's blob service.

func (*RepositoryMiddleware) Manifests

func (m *RepositoryMiddleware) Manifests(ctx context.Context, options ...distribution.ManifestServiceOption) (distribution.ManifestService, error)

Manifests returns a reference to this repository's manifest service. with the supplied options applied.

func (*RepositoryMiddleware) Named

Named returns the name of the repository.

func (*RepositoryMiddleware) Tags

func (m *RepositoryMiddleware) Tags(ctx context.Context) distribution.TagService

Tags returns a reference to this repositories tag service

Jump to

Keyboard shortcuts

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