Documentation ¶
Index ¶
- Variables
- func AllManifests(ctx context.Context, from imagereference.DockerImageReference, ...) (map[digest.Digest]distribution.Manifest, ...)
- func IsImageForbidden(err error) bool
- func IsImageNotFound(err error) bool
- func ManifestToImageConfig(ctx context.Context, srcManifest distribution.Manifest, ...) (*docker10.DockerImageConfig, []distribution.Descriptor, error)
- func ManifestsFromList(ctx context.Context, srcDigest digest.Digest, ...) (map[digest.Digest]distribution.Manifest, ...)
- func NewImageForbidden(msg string, err error) error
- func NewImageNotFound(msg string, err error) error
- func PlatformSpecString(platform manifestlist.PlatformSpec) string
- 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
- func (o *FilterOptions) Bind(flags *pflag.FlagSet)
- func (o *FilterOptions) Complete(flags *pflag.FlagSet) error
- func (o *FilterOptions) Include(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool
- func (o *FilterOptions) IncludeAll(d *manifestlist.ManifestDescriptor, hasMultiple bool) bool
- func (o *FilterOptions) Validate() error
- type ManifestLocation
- type ParallelOptions
- type SecurityOptions
- type Verifier
Constants ¶
This section is empty.
Variables ¶
var PreferManifestList = distribution.WithManifestMediaTypes([]string{ manifestlist.MediaTypeManifestList, schema2.MediaTypeManifest, })
PreferManifestList specifically requests a manifest list first
Functions ¶
func AllManifests ¶
func AllManifests(ctx context.Context, from imagereference.DockerImageReference, repo distribution.Repository) (map[digest.Digest]distribution.Manifest, *manifestlist.DeserializedManifestList, digest.Digest, error)
AllManifests returns all non-list manifests, the list manifest (if any), the digest the from refers to, or an error.
func IsImageForbidden ¶
func IsImageNotFound ¶
func ManifestToImageConfig ¶
func ManifestToImageConfig(ctx context.Context, srcManifest distribution.Manifest, blobs distribution.BlobService, location ManifestLocation) (*docker10.DockerImageConfig, []distribution.Descriptor, error)
ManifestToImageConfig takes an image manifest and converts it into a structured object.
func ManifestsFromList ¶
func ManifestsFromList(ctx context.Context, srcDigest digest.Digest, srcManifest distribution.Manifest, manifests distribution.ManifestService, ref imagereference.DockerImageReference) (map[digest.Digest]distribution.Manifest, *manifestlist.DeserializedManifestList, digest.Digest, error)
ManifestsFromList returns a map of all image manifests for a given manifest. It returns the ManifestList and its digest if srcManifest is a list, or an error.
func NewImageForbidden ¶
func NewImageNotFound ¶
func PlatformSpecString ¶
func PlatformSpecString(platform manifestlist.PlatformSpec) string
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 performs defaulting by OS.
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.
func (*FilterOptions) Validate ¶
func (o *FilterOptions) Validate() error
Validate checks whether the flags are ready for use.
type ManifestLocation ¶
func FirstManifest ¶
func FirstManifest(ctx context.Context, from imagereference.DockerImageReference, repo distribution.Repository, filterFn FilterFunc) (distribution.Manifest, ManifestLocation, error)
FirstManifest returns the first manifest at the request location that matches the filter function.
func (ManifestLocation) IsList ¶
func (m ManifestLocation) IsList() bool
func (ManifestLocation) String ¶
func (m ManifestLocation) String() string
type ParallelOptions ¶
type ParallelOptions struct {
MaxPerRegistry int
}
func (*ParallelOptions) Bind ¶
func (o *ParallelOptions) Bind(flags *pflag.FlagSet)
type SecurityOptions ¶
type SecurityOptions struct { RegistryConfig string Insecure bool SkipVerification bool CachedContext *registryclient.Context }
func (*SecurityOptions) Bind ¶
func (o *SecurityOptions) Bind(flags *pflag.FlagSet)
func (*SecurityOptions) Context ¶
func (o *SecurityOptions) Context() (*registryclient.Context, error)
func (*SecurityOptions) NewContext ¶
func (o *SecurityOptions) NewContext() (*registryclient.Context, error)