gcr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateManifestList

func CreateManifestList(targetRef string, images []PlatformImage) error

CreateManifestList builds an OCI image index (manifest list) from the given platform images and pushes it to targetRef. It uses mutate.AppendManifests and remote.WriteIndex (same approach as crane index append), which pushes all child image manifests and layers before pushing the index itself.

func CreateManifestListFromRefs

func CreateManifestListFromRefs(targetRef string, refs []PlatformRef) error

CreateManifestListFromRefs builds an OCI image index from images that already exist in the registry. It fetches only the descriptors (no layers) and creates a manifest list pointing to them.

func Retag

func Retag(sourceRef, targetRef string) error

Retag creates an additional tag alias for an existing image in a registry. It copies the manifest from sourceRef to targetRef without re-uploading layers.

Types

type PlatformImage

type PlatformImage struct {
	Image    v1.Image
	Platform string // e.g. "linux/amd64"
}

PlatformImage pairs a v1.Image (loaded from a local OCI tar) with its target platform string.

type PlatformRef

type PlatformRef struct {
	Ref      string // e.g. "registry.example.com/app:v1.linux-amd64.42"
	Platform string // e.g. "linux/amd64"
}

PlatformRef pairs a registry reference with its target platform.

Jump to

Keyboard shortcuts

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