File: manifests.go

package info (click to toggle)
golang-github-containers-common 0.64.1%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 5,932 kB
  • sloc: makefile: 132; sh: 111
file content (31 lines) | stat: -rw-r--r-- 1,493 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package define

import (
	"github.com/containers/image/v5/manifest"
)

// ManifestListDescriptor describes a manifest that is mentioned in an
// image index or manifest list.
// Contains a subset of the fields which are present in both the OCI spec and
// the Docker spec, along with some which are unique to one or the other.
type ManifestListDescriptor struct {
	manifest.Schema2Descriptor
	Platform     manifest.Schema2PlatformSpec `json:"platform,omitempty"`
	Annotations  map[string]string            `json:"annotations,omitempty"`
	ArtifactType string                       `json:"artifactType,omitempty"`
	Data         []byte                       `json:"data,omitempty"`
	Files        []string                     `json:"files,omitempty"`
}

// ManifestListData is a list of platform-specific manifests, specifically used to
// generate output struct for `podman manifest inspect`. Reason for maintaining and
// having this type is to ensure we can have a single type which contains exclusive
// fields from both Docker manifest format and OCI manifest format.
type ManifestListData struct {
	SchemaVersion int                      `json:"schemaVersion"`
	MediaType     string                   `json:"mediaType"`
	ArtifactType  string                   `json:"artifactType,omitempty"`
	Manifests     []ManifestListDescriptor `json:"manifests"`
	Subject       *ManifestListDescriptor  `json:"subject,omitempty"`
	Annotations   map[string]string        `json:"annotations,omitempty"`
}