v4.2.0-alpha.0+incompa... Latest Latest

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 23 Imported by: 66




This section is empty.


PreferManifestList specifically requests a manifest list first


func AllManifests

AllManifests returns all non-list manifests, the list manifest (if any), the digest the from refers to, or an error.

func IsImageForbidden

func IsImageForbidden(err error) bool

func IsImageNotFound

func IsImageNotFound(err error) bool

func ManifestToImageConfig

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 NewImageForbidden(msg string, err error) error

func NewImageNotFound

func NewImageNotFound(msg string, err error) error

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 switches to v2 schema


type FilterFunc

type FilterFunc func(*manifestlist.ManifestDescriptor, bool) bool

type FilterOptions

type FilterOptions struct {
	FilterByOS      string
	DefaultOSFilter bool
	OSFilter        *regexp.Regexp

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

type ManifestLocation struct {
	Manifest     digest.Digest
	ManifestList digest.Digest

func FirstManifest

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)

type Verifier

type Verifier interface {
	Verify(dgst, contentDgst digest.Digest)
	Verified() bool

func NewVerifier

func NewVerifier() Verifier


Path Synopsis

Jump to

Keyboard shortcuts

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