specs-go: adding mediaType to the index and manifest structures · opencontainers/image-spec@dcdcb7f (original) (raw)

2 files changed

lines changed

Original file line number Diff line number Diff line change
@@ -21,6 +21,9 @@ import "github.com/opencontainers/image-spec/specs-go"
21 21 type Index struct {
22 22 specs.Versioned
23 23
24 +// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.index.v1+json`
25 +MediaType string `json:"mediaType,omitempty"`
26 +
24 27 // Manifests references platform specific manifests.
25 28 Manifests []Descriptor `json:"manifests"`
26 29
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ import "github.com/opencontainers/image-spec/specs-go"
20 20 type Manifest struct {
21 21 specs.Versioned
22 22
23 +// MediaType specificies the type of this document data structure e.g. `application/vnd.oci.image.manifest.v1+json`
24 +MediaType string `json:"mediaType,omitempty"`
25 +
23 26 // Config references a configuration object for a container, by digest.
24 27 // The referenced configuration object is a JSON blob that the runtime uses to set up the container.
25 28 Config Descriptor `json:"config"`