Browse code

vendor: github.com/opencontainers/image-spec v1.0.2

- Bring mediaType out of reserved status
- specs-go: adding mediaType to the index and manifest structures

full diff: https://github.com/opencontainers/image-spec/compare/v1.0.1...v1.0.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2021/11/18 05:56:38
Showing 5 changed files
... ...
@@ -276,11 +276,7 @@ func TestPluginBackCompatMediaTypes(t *testing.T) {
276 276
 	assert.NilError(t, err)
277 277
 	defer rdr.Close()
278 278
 
279
-	type manifest struct {
280
-		MediaType string
281
-		v1.Manifest
282
-	}
283
-	var m manifest
279
+	var m v1.Manifest
284 280
 	assert.NilError(t, json.NewDecoder(rdr).Decode(&m))
285 281
 	assert.Check(t, cmp.Equal(m.MediaType, images.MediaTypeDockerSchema2Manifest))
286 282
 	assert.Check(t, cmp.Len(m.Layers, 1))
... ...
@@ -89,7 +89,7 @@ google.golang.org/grpc                              f495f5b15ae7ccda3b38c53a1bfc
89 89
 # packages but should be newer or equal.
90 90
 github.com/opencontainers/runc                      52b36a2dd837e8462de8e01458bf02cf9eea47dd # v1.0.2
91 91
 github.com/opencontainers/runtime-spec              1c3f411f041711bbeecf35ff7e93461ea6789220 # v1.0.3-0.20210326190908-1c3f411f0417
92
-github.com/opencontainers/image-spec                d60099175f88c47cd379c4738d158884749ed235 # v1.0.1
92
+github.com/opencontainers/image-spec                67d2d5658fe0476ab9bf414cec164077ebff3920 # v1.0.2
93 93
 github.com/cyphar/filepath-securejoin               a261ee33d7a517f054effbf451841abaafe3e0fd # v0.2.2
94 94
 
95 95
 # go-systemd v17 is required by github.com/coreos/pkg/capnslog/journald_formatter.go
... ...
@@ -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
 
... ...
@@ -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"`
... ...
@@ -22,7 +22,7 @@ const (
22 22
 	// VersionMinor is for functionality in a backwards-compatible manner
23 23
 	VersionMinor = 0
24 24
 	// VersionPatch is for backwards-compatible bug fixes
25
-	VersionPatch = 1
25
+	VersionPatch = 2
26 26
 
27 27
 	// VersionDev indicates development branch. Releases will be empty string.
28 28
 	VersionDev = ""