registry

package
v0.11.13 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OCIScheme is the URL scheme for OCI-based requests
	OCIScheme = "oci"

	OCICatalogManifestMediaType = "application/vnd.cidverse.cid.catalog-config.v1+json"

	OCICatalogFileMediaType = "application/vnd.cidverse.cid.catalog.v1+json"
)

Variables

This section is empty.

Functions

func GetArtifactDigest

func GetArtifactDigest(reference string) (string, error)

func IsOCI

func IsOCI(url string) bool

IsOCI determines whether a URL is to be treated as an OCI URL

func NewAuthClient added in v0.11.12

func NewAuthClient() *auth.Client

NewAuthClient returns an auth client that reuses the local container runtime credentials (e.g. ~/.docker/config.json), falling back to anonymous access when no credential store is available.

func ParseReference

func ParseReference(raw string) (registry.Reference, error)

ParseReference will replace + with _ in the tag

func PushCatalog

func PushCatalog(ref string, registryHost string, username string, password string, catalogFile string) (*ocispec.Descriptor, error)

func ResolveReferenceDigest added in v0.11.12

func ResolveReferenceDigest(reference string) (string, error)

ResolveReferenceDigest resolves an image reference (tag or digest) to its manifest digest. Unlike GetArtifactDigest it uses a manifest HEAD request instead of downloading the manifest, which makes it cheap enough to resolve every tag of a repository.

Types

type ImageTag

type ImageTag struct {
	Repository string `json:"repository"`
	Tag        string `json:"tag"`
	Digest     string `json:"digest,omitempty"` // Digest is the manifest digest the tag resolved to, empty if unresolved
}

func FindTagsWithDigest added in v0.11.12

func FindTagsWithDigest(repositoryURL string) ([]ImageTag, error)

FindTagsWithDigest returns every tag of a repository together with the manifest digest it currently resolves to. Tags that cannot be resolved are omitted: an unpinned tag must never be used to select an executable, because the tag can be moved to a different image after discovery. The result is sorted by tag, as the registry returns tags in an arbitrary order.

Jump to

Keyboard shortcuts

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