docker: Index | Files

package manifestlist

import ""


Package Files



const (
    // MediaTypeManifestList specifies the mediaType for manifest lists.
    MediaTypeManifestList = "application/vnd.docker.distribution.manifest.list.v2+json"


var OCISchemaVersion = manifest.Versioned{
    SchemaVersion: 2,
    MediaType:     v1.MediaTypeImageIndex,

OCISchemaVersion provides a pre-initialized version structure for this packages OCIschema version of the manifest.

var SchemaVersion = manifest.Versioned{
    SchemaVersion: 2,
    MediaType:     MediaTypeManifestList,

SchemaVersion provides a pre-initialized version structure for this packages version of the manifest.

type DeserializedManifestList Uses

type DeserializedManifestList struct {
    // contains filtered or unexported fields

DeserializedManifestList wraps ManifestList with a copy of the original JSON.

func FromDescriptors Uses

func FromDescriptors(descriptors []ManifestDescriptor) (*DeserializedManifestList, error)

FromDescriptors takes a slice of descriptors, and returns a DeserializedManifestList which contains the resulting manifest list and its JSON representation.

func FromDescriptorsWithMediaType Uses

func FromDescriptorsWithMediaType(descriptors []ManifestDescriptor, mediaType string) (*DeserializedManifestList, error)

FromDescriptorsWithMediaType is for testing purposes, it's useful to be able to specify the media type explicitly

func (*DeserializedManifestList) MarshalJSON Uses

func (m *DeserializedManifestList) MarshalJSON() ([]byte, error)

MarshalJSON returns the contents of canonical. If canonical is empty, marshals the inner contents.

func (DeserializedManifestList) Payload Uses

func (m DeserializedManifestList) Payload() (string, []byte, error)

Payload returns the raw content of the manifest list. The contents can be used to calculate the content identifier.

func (*DeserializedManifestList) UnmarshalJSON Uses

func (m *DeserializedManifestList) UnmarshalJSON(b []byte) error

UnmarshalJSON populates a new ManifestList struct from JSON data.

type ManifestDescriptor Uses

type ManifestDescriptor struct {

    // Platform specifies which platform the manifest pointed to by the
    // descriptor runs on.
    Platform PlatformSpec `json:"platform"`

A ManifestDescriptor references a platform-specific manifest.

type ManifestList Uses

type ManifestList struct {

    // Config references the image configuration as a blob.
    Manifests []ManifestDescriptor `json:"manifests"`

ManifestList references manifests for various platforms.

func (ManifestList) References Uses

func (m ManifestList) References() []distribution.Descriptor

References returns the distribution descriptors for the referenced image manifests.

type PlatformSpec Uses

type PlatformSpec struct {
    // Architecture field specifies the CPU architecture, for example
    // `amd64` or `ppc64`.
    Architecture string `json:"architecture"`

    // OS specifies the operating system, for example `linux` or `windows`.
    OS  string `json:"os"`

    // OSVersion is an optional field specifying the operating system
    // version, for example `10.0.10586`.
    OSVersion string `json:"os.version,omitempty"`

    // OSFeatures is an optional field specifying an array of strings,
    // each listing a required OS feature (for example on Windows `win32k`).
    OSFeatures []string `json:"os.features,omitempty"`

    // Variant is an optional field specifying a variant of the CPU, for
    // example `ppc64le` to specify a little-endian version of a PowerPC CPU.
    Variant string `json:"variant,omitempty"`

    // Features is an optional field specifying an array of strings, each
    // listing a required CPU feature (for example `sse4` or `aes`).
    Features []string `json:"features,omitempty"`

PlatformSpec specifies a platform where a particular image manifest is applicable.

Package manifestlist imports 7 packages (graph). Updated 2019-04-17. Refresh now. Tools for package owners.