File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ pub enum MediaTypes {
36
36
#[ strum( serialize = "application/vnd.oci.image.manifest.v1+json" ) ]
37
37
#[ strum( props( Sub = "vnd.oci.image.manifest.v1+json" ) ) ]
38
38
OciImageManifest ,
39
+ // OCI Image index
40
+ #[ strum( serialize = "application/vnd.oci.image.index.v1+json" ) ]
41
+ #[ strum( props( Sub = "vnd.oci.image.index.v1+json" ) ) ]
42
+ OciImageIndexV1 ,
39
43
/// Generic JSON
40
44
#[ strum( serialize = "application/json" ) ]
41
45
#[ strum( props( Sub = "json" ) ) ]
@@ -60,6 +64,7 @@ impl MediaTypes {
60
64
( "vnd.docker.image.rootfs.diff.tar.gzip" , _) => Ok ( MediaTypes :: ImageLayerTgz ) ,
61
65
( "vnd.docker.container.image.v1" , "json" ) => Ok ( MediaTypes :: ContainerConfigV1 ) ,
62
66
( "vnd.oci.image.manifest.v1" , "json" ) => Ok ( MediaTypes :: OciImageManifest ) ,
67
+ ( "vnd.oci.image.index.v1" , "json" ) => Ok ( MediaTypes :: OciImageIndexV1 ) ,
63
68
_ => Err ( crate :: Error :: UnknownMimeType ( mtype. clone ( ) ) ) ,
64
69
}
65
70
}
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ impl Config {
115
115
( MediaTypes :: ManifestV2S1Signed , Some ( 0.4 ) ) ,
116
116
( MediaTypes :: ManifestList , Some ( 0.5 ) ) ,
117
117
( MediaTypes :: OciImageManifest , Some ( 0.5 ) ) ,
118
+ ( MediaTypes :: OciImageIndexV1 , Some ( 0.5 ) ) ,
118
119
] ,
119
120
// GCR incorrectly parses `q` parameters, so we use special Accept for it.
120
121
// Bug: https://issuetracker.google.com/issues/159827510.
@@ -124,6 +125,7 @@ impl Config {
124
125
( MediaTypes :: ManifestV2S1Signed , None ) ,
125
126
( MediaTypes :: ManifestList , None ) ,
126
127
( MediaTypes :: OciImageManifest , None ) ,
128
+ ( MediaTypes :: OciImageIndexV1 , None ) ,
127
129
] ,
128
130
} ,
129
131
} ;
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ impl Client {
87
87
content_digest,
88
88
) )
89
89
}
90
- mediatypes:: MediaTypes :: ManifestList => Ok ( (
90
+ mediatypes:: MediaTypes :: ManifestList | mediatypes :: MediaTypes :: OciImageIndexV1 => Ok ( (
91
91
res. json :: < ManifestList > ( ) . await . map ( Manifest :: ML ) ?,
92
92
content_digest,
93
93
) ) ,
You can’t perform that action at this time.
0 commit comments