Documentation ¶
Index ¶
- Variables
- func FirstManifest(ctx context.Context, from imagereference.DockerImageReference, ...) (distribution.Manifest, digest.Digest, string, error)
- func ManifestToImageConfig(ctx context.Context, srcManifest distribution.Manifest, ...) (*docker10.DockerImageConfig, []distribution.Descriptor, error)
- func ProcessManifestList(ctx context.Context, srcDigest digest.Digest, ...) ([]distribution.Manifest, distribution.Manifest, digest.Digest, error)
- func PutManifestInCompatibleSchema(ctx context.Context, srcManifest distribution.Manifest, tag string, ...) (digest.Digest, error)
- type FilterFunc
- type FilterOptions
Constants ¶
This section is empty.
Variables ¶
var PreferManifestList = distribution.WithManifestMediaTypes([]string{ manifestlist.MediaTypeManifestList, schema2.MediaTypeManifest, })
PreferManifestList specifically requests a manifest list first
Functions ¶
func FirstManifest ¶
func FirstManifest(ctx context.Context, from imagereference.DockerImageReference, repo distribution.Repository, filterFn FilterFunc) (distribution.Manifest, digest.Digest, string, error)
FirstManifest returns the first manifest at the request location that matches the filter function.
func ManifestToImageConfig ¶
func ManifestToImageConfig(ctx context.Context, srcManifest distribution.Manifest, blobs distribution.BlobService, location string) (*docker10.DockerImageConfig, []distribution.Descriptor, error)
ManifestToImageConfig takes an image manifest and converts it into a structured object.
func ProcessManifestList ¶
func ProcessManifestList(ctx context.Context, srcDigest digest.Digest, srcManifest distribution.Manifest, manifests distribution.ManifestService, ref imagereference.DockerImageReference, filterFn FilterFunc) ([]distribution.Manifest, distribution.Manifest, digest.Digest, error)
func PutManifestInCompatibleSchema ¶
func PutManifestInCompatibleSchema( ctx context.Context, srcManifest distribution.Manifest, tag string, toManifests distribution.ManifestService, ref reference.Named, blobs distribution.BlobService, configJSON []byte, ) (digest.Digest, error)
TDOO: remove when quay.io switches to v2 schema
Types ¶
type FilterFunc ¶
type FilterFunc func(*manifestlist.ManifestDescriptor, bool) bool
type FilterOptions ¶
FilterOptions assist in filtering out unneeded manifests from ManifestList objects.
func (*FilterOptions) Bind ¶
func (o *FilterOptions) Bind(flags *pflag.FlagSet)
Bind adds the options to the flag set.
func (*FilterOptions) Complete ¶
func (o *FilterOptions) Complete(flags *pflag.FlagSet) error
Complete checks whether the flags are ready for use.
func (*FilterOptions) Include ¶
func (o *FilterOptions) Include(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool
Include returns true if the provided manifest should be included, or the first image if the user didn't alter the default selection and there is only one image.
func (*FilterOptions) IncludeAll ¶
func (o *FilterOptions) IncludeAll(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool
IncludeAll returns true if the provided manifest matches the filter, or all if there was no filter.