registry

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDockerAuthResolver added in v0.1.7

func NewDockerAuthResolver() remotes.Resolver

returns a containerd "Resolver" suitable for interacting with registries (that will transparently honor DOCKERHUB_PUBLIC_PROXY for read-only lookups *and* deal with looking up credentials from ~/.docker/config.json)

Types

type ResolvedObject

type ResolvedObject struct {
	Desc ocispec.Descriptor

	ImageRef string
	// contains filtered or unexported fields
}

func Resolve

func Resolve(ctx context.Context, image string) (*ResolvedObject, error)

Resolve returns an object which can be used to query a registry for manifest objects or certain blobs with type checking helpers

func (ResolvedObject) Architectures

func (obj ResolvedObject) Architectures(ctx context.Context) (map[string][]ResolvedObject, error)

Architectures returns a map of "bashbrew architecture" strings to a list of members of the object (as either a manifest or an index) which match the given "bashbrew architecture" (either in an explicit "platform" object or by reading all the way down into the image "config" object for the platform fields)

func (ResolvedObject) At

At returns a new object pointing to the given descriptor (still within the context of the same repository as the original resolved object)

func (ResolvedObject) ConfigBlob

func (obj ResolvedObject) ConfigBlob(ctx context.Context) (*ocispec.Image, error)

ConfigBlob assumes the given object is a "config" blob (see ResolvedObject.At) and fetches/returns the parsed config object

func (ResolvedObject) Index

func (obj ResolvedObject) Index(ctx context.Context) (*ocispec.Index, error)

Index assumes the given object is an "index" or "manifest list" and fetches/returns the parsed index JSON

func (ResolvedObject) IsImageIndex

func (obj ResolvedObject) IsImageIndex() bool

func (ResolvedObject) IsImageManifest

func (obj ResolvedObject) IsImageManifest() bool

func (ResolvedObject) Manifest

func (obj ResolvedObject) Manifest(ctx context.Context) (*ocispec.Manifest, error)

Manifest assumes the given object is a (single-image) "manifest" (see ResolvedObject.At) and fetches/returns the parsed manifest JSON

func (ResolvedObject) Manifests

func (obj ResolvedObject) Manifests(ctx context.Context) ([]ocispec.Descriptor, error)

Manifests returns a list of "content descriptors" that corresponds to either this object (if it is a single-image manifest) or all the manifests of the index/manifest list this object represents

Jump to

Keyboard shortcuts

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