Documentation ¶
Index ¶
- func NewDockerAuthResolver() remotes.Resolver
- type ResolvedObject
- func (obj ResolvedObject) Architectures(ctx context.Context) (map[string][]ResolvedObject, error)
- func (obj ResolvedObject) At(desc ocispec.Descriptor) *ResolvedObject
- func (obj ResolvedObject) ConfigBlob(ctx context.Context) (*ocispec.Image, error)
- func (obj ResolvedObject) Index(ctx context.Context) (*ocispec.Index, error)
- func (obj ResolvedObject) IsImageIndex() bool
- func (obj ResolvedObject) IsImageManifest() bool
- func (obj ResolvedObject) Manifest(ctx context.Context) (*ocispec.Manifest, error)
- func (obj ResolvedObject) Manifests(ctx context.Context) ([]ocispec.Descriptor, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDockerAuthResolver ¶ added in v0.1.7
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 ¶
func (obj ResolvedObject) At(desc ocispec.Descriptor) *ResolvedObject
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 ¶
ConfigBlob assumes the given object is a "config" blob (see ResolvedObject.At) and fetches/returns the parsed config object
func (ResolvedObject) Index ¶
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 ¶
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