multiarch

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReferenceTypeAnnotation   = "vnd.docker.reference.type"
	ReferenceTypeAttestation  = "attestation-manifest"
	AttestationPlatform       = "unknown/unknown"
	ReferenceDigestAnnotation = "vnd.docker.reference.digest"
)

Variables

This section is empty.

Functions

func MatchPlatformsForAppend added in v0.4.2

func MatchPlatformsForAppend(config schema.ContainConfig) (match.Matcher, error)

MatchPlatformsForAppend matches only on platform equality which is stricter than platform at runtime image pull because we don't want to widen the scope of a base image (config could allow different matching as opt-in, maybe with v1.Platform.Satisfies)

Types

type EachAppend

type EachAppend func(baseRef name.Digest, tagRef name.Reference, tagRegistry *registry.RegistryConfig) (mutate.IndexAddendum, error)

type IndexManifests

type IndexManifests struct {
	// contains filtered or unexported fields
}

func NewFromMultiArchBase

func NewFromMultiArchBase(config schema.ContainConfig, baseRegistry *registry.RegistryConfig) (*IndexManifests, error)

func (*IndexManifests) GetPrototypeBase

func (m *IndexManifests) GetPrototypeBase() (name.Digest, error)

GetPrototypeBase gets a single base to operate on as a prototype of how all archs/manifests should be mutated Deprecated: see EachAppend

func (*IndexManifests) PushIndex

func (m *IndexManifests) PushIndex(tag name.Reference, result appender.AppendResult, config *registry.RegistryConfig) (v1.Hash, error)

PushIndex takes the AppendResult of the prototype contain and the original index to push a new multi-arch (i.e. multi-manifest) image Deprecated: hard to use because config can't be updated and referential consistency at push is non-trivial

func (*IndexManifests) PushWithAppend

func (m *IndexManifests) PushWithAppend(append EachAppend, tagRef name.Reference, tagRegistry *registry.RegistryConfig) (v1.Hash, error)

type TaggableChild

type TaggableChild struct {
	// contains filtered or unexported fields
}

TaggableChild allows remote.Put of an index's child manifest and holds enough metadata for the index to reference it

func NewTaggableChild

func NewTaggableChild(manifest v1.Manifest) (TaggableChild, error)

func (TaggableChild) Digest

func (t TaggableChild) Digest() (v1.Hash, error)

func (TaggableChild) MediaType

func (t TaggableChild) MediaType() (types.MediaType, error)

func (TaggableChild) RawManifest

func (t TaggableChild) RawManifest() ([]byte, error)

func (TaggableChild) Size

func (t TaggableChild) Size() (int64, error)

type TaggableIndex

type TaggableIndex struct {
	// contains filtered or unexported fields
}

TaggableIndex wraps v1.ImageIndex so that go-containerregistry remote.Put doesn't treat it as an image

func NewTaggableIndex

func NewTaggableIndex(index v1.ImageIndex) (TaggableIndex, error)

NewTaggableIndex extracts the necessary data immediately so later mutations won't affect the manifest and calls to interface methods won't err

func (TaggableIndex) Digest

func (t TaggableIndex) Digest() (v1.Hash, error)

func (TaggableIndex) MediaType

func (t TaggableIndex) MediaType() (types.MediaType, error)

func (TaggableIndex) RawManifest

func (t TaggableIndex) RawManifest() ([]byte, error)

func (TaggableIndex) Size

func (t TaggableIndex) Size() (int64, error)

type ToAppend

type ToAppend struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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