registry

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package registry stores and retrieves OCI blobs and manifests in S3, plus maintains a global catalog index. Vendor-agnostic; cocoonstack concepts live in the snapshot and cloudimg packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

Registry is the storage facade. Safe for concurrent use.

func New

func New(client *objectstore.Client) *Registry

New creates a Registry backed by the given object store client.

func NewFromEnv

func NewFromEnv() (*Registry, error)

NewFromEnv creates a Registry using S3 configuration from environment variables.

func (*Registry) BlobExists

func (r *Registry) BlobExists(ctx context.Context, digest string) (bool, error)

BlobExists reports whether a blob with the given digest exists.

func (*Registry) BlobSize

func (r *Registry) BlobSize(ctx context.Context, digest string) (int64, error)

BlobSize returns the size of a blob in bytes.

func (*Registry) DeleteBlob

func (r *Registry) DeleteBlob(ctx context.Context, digest string) error

DeleteBlob removes a blob from the object store.

func (*Registry) DeleteManifest

func (r *Registry) DeleteManifest(ctx context.Context, name, tag string) error

DeleteManifest removes a manifest tag and updates the catalog.

func (*Registry) GetCatalog

func (r *Registry) GetCatalog(ctx context.Context) (*manifest.Catalog, error)

GetCatalog returns the parsed global catalog index.

func (*Registry) GetCatalogWithDigest added in v0.1.7

func (r *Registry) GetCatalogWithDigest(ctx context.Context) (*manifest.Catalog, string, error)

GetCatalogWithDigest returns the parsed catalog and its SHA-256 digest.

func (*Registry) ListTags

func (r *Registry) ListTags(ctx context.Context, name string) ([]string, error)

ListTags returns all tags for a repository, skipping by-digest copies.

func (*Registry) ManifestJSON

func (r *Registry) ManifestJSON(ctx context.Context, name, tag string) ([]byte, error)

ManifestJSON fetches a manifest by repository name and tag.

func (*Registry) ManifestJSONByDigest added in v0.1.7

func (r *Registry) ManifestJSONByDigest(ctx context.Context, name, digest string) ([]byte, error)

ManifestJSONByDigest fetches a manifest by repository name and content digest.

func (*Registry) PushBlobFromStream

func (r *Registry) PushBlobFromStream(ctx context.Context, digest string, body io.Reader, size int64) error

PushBlobFromStream uploads a blob, deduplicating if it already exists.

func (*Registry) PushManifestJSON

func (r *Registry) PushManifestJSON(ctx context.Context, name, tag string, data []byte) error

PushManifestJSON uploads a manifest under both the tag and digest keys, then updates the catalog.

func (*Registry) PushManifestJSONByDigest added in v0.1.7

func (r *Registry) PushManifestJSONByDigest(ctx context.Context, name string, data []byte) (string, error)

PushManifestJSONByDigest stores a manifest by digest only (no tag, no catalog update). Used for OCI index child manifests. Returns the computed digest.

func (*Registry) StreamBlob

func (r *Registry) StreamBlob(ctx context.Context, digest string) (io.ReadCloser, int64, error)

StreamBlob returns a streaming reader and size. Caller must close the reader.

Jump to

Keyboard shortcuts

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