types

package
v2.1.100 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MediaTypeDockerSchema2Manifest is the Docker v2.2 schema media type for a manifest object
	MediaTypeDockerSchema2Manifest = "application/vnd.docker.distribution.manifest.v2+json"
	// MediaTypeDockerSchema2ManifestList is the Docker v2.2 schema media type for a manifest list object
	MediaTypeDockerSchema2ManifestList = "application/vnd.docker.distribution.manifest.list.v2+json"
	// MediaTypeDockerTarGzipLayer is the Docker schema media type for a tar+gzip filesystem layer
	MediaTypeDockerTarGzipLayer = "application/vnd.docker.image.rootfs.diff.tar.gzip"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image struct {
	ocispec.Image
	// TODO https://github.com/opencontainers/image-spec/pull/809
	Variant    string   `json:"variant,omitempty"`
	OSVersion  string   `json:"os.version,omitempty"`
	OSFeatures []string `json:"os.features,omitempty"`
}

Image struct handles Windows support extensions to OCI spec

type Manifest

type Manifest struct {
	Descriptor ocispec.Descriptor
	PushRef    bool
}

Manifest is an ocispec.Descriptor of media type manifest (OCI or Docker) along with a boolean to help determine whether a reference to the manifest must be pushed to the target (manifest list) repo location before finalizing the manifest list push operation.

type ManifestEntry

type ManifestEntry struct {
	Image    string
	Platform ocispec.Platform
}

ManifestEntry contains an image reference and it's corresponding OCI platform definition (OS/Arch/Variant)

type ManifestList

type ManifestList struct {
	Name      string
	Type      ManifestType
	Reference reference.Named
	Resolver  remotes.Resolver
	Manifests []Manifest
}

ManifestList represents the information necessary to assemble and push the right data to a registry to form a manifestlist or OCI index entry.

type ManifestType

type ManifestType int

ManifestType specifies whether to use the OCI index media type and format or the Docker manifestList media type and format for the registry push operation.

const (
	// OCI is used to specify the "index" type
	OCI ManifestType = iota
	// Docker is used for the "manifestList" type
	Docker
)

type Request

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

Request represents a registry reference and (optional) digest to a specific container manifest

func NewRequest

func NewRequest(ref reference.Named, digest digest.Digest, mediaTypes []string, resolver remotes.Resolver) *Request

NewRequest creates a request from supplied image parameters

func (*Request) Digest

func (r *Request) Digest() digest.Digest

Digest returns the image digest hash of this image manifest

func (*Request) MediaTypes

func (r *Request) MediaTypes() []string

MediaTypes returns the media type string for this image

func (*Request) Reference

func (r *Request) Reference() reference.Named

Reference returns the image reference as a `Named` object

func (*Request) Resolver

func (r *Request) Resolver() remotes.Resolver

Resolver returns the containerd remote's Docker resolver to use for the request

type YAMLInput

type YAMLInput struct {
	Image     string
	Tags      []string
	Manifests []ManifestEntry
}

YAMLInput contains the parsed yaml fields from the push command of manifest-tool

Jump to

Keyboard shortcuts

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