@@ -17,7 +17,8 @@ package v1
1717import digest "github.com/opencontainers/go-digest"
1818
1919// Descriptor describes the disposition of targeted content.
20- // This structure provides `application/vnd.oci.descriptor.v1+json` mediatype when marshalled to JSON
20+ // This structure provides `application/vnd.oci.descriptor.v1+json` mediatype
21+ // when marshalled to JSON.
2122type Descriptor struct {
2223 // MediaType is the media type of the object this schema refers to.
2324 MediaType string `json:"mediaType,omitempty"`
@@ -33,4 +34,35 @@ type Descriptor struct {
3334
3435 // Annotations contains arbitrary metadata relating to the targeted content.
3536 Annotations map [string ]string `json:"annotations,omitempty"`
37+
38+ // Platform describes the platform which the image in the manifest runs on.
39+ //
40+ // This should only be used when referring to a manifest.
41+ Platform * Platform `json:"platform,omitempty"`
42+ }
43+
44+ // Platform describes the platform which the image in the manifest runs on.
45+ type Platform struct {
46+ // Architecture field specifies the CPU architecture, for example
47+ // `amd64` or `ppc64`.
48+ Architecture string `json:"architecture"`
49+
50+ // OS specifies the operating system, for example `linux` or `windows`.
51+ OS string `json:"os"`
52+
53+ // OSVersion is an optional field specifying the operating system
54+ // version, for example `10.0.10586`.
55+ OSVersion string `json:"os.version,omitempty"`
56+
57+ // OSFeatures is an optional field specifying an array of strings,
58+ // each listing a required OS feature (for example on Windows `win32k`).
59+ OSFeatures []string `json:"os.features,omitempty"`
60+
61+ // Variant is an optional field specifying a variant of the CPU, for
62+ // example `ppc64le` to specify a little-endian version of a PowerPC CPU.
63+ Variant string `json:"variant,omitempty"`
64+
65+ // Features is an optional field specifying an array of strings, each
66+ // listing a required CPU feature (for example `sse4` or `aes`).
67+ Features []string `json:"features,omitempty"`
3668}
0 commit comments