Skip to content

Commit 2397f4c

Browse files
committed
manifest: support OCI Image Spec 1.1.0-rc5
Signed-off-by: wayne warren <[email protected]>
1 parent b512726 commit 2397f4c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/image/manifest.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ pub struct ImageManifest {
5050
#[getset(get = "pub", set = "pub")]
5151
#[builder(default)]
5252
media_type: Option<MediaType>,
53+
/// This OPTIONAL property contains the type of an artifact when the manifest is used for an
54+
/// artifact. This MUST be set when config.mediaType is set to the empty value. If defined, the
55+
/// value MUST comply with RFC 6838, including the naming requirements in its section 4.2, and
56+
/// MAY be registered with IANA. Implementations storing or copying image manifests MUST NOT
57+
/// error on encountering an artifactType that is unknown to the implementation.
58+
#[serde(skip_serializing_if = "Option::is_none")]
59+
#[getset(get = "pub", set = "pub")]
60+
#[builder(default)]
61+
artifact_type: Option<MediaType>,
5362
/// This REQUIRED property references a configuration object for a
5463
/// container, by digest. Beyond the descriptor requirements,
5564
/// the value has the following additional restrictions:
@@ -69,6 +78,12 @@ pub struct ImageManifest {
6978
/// attributes of the initial empty directory are unspecified.
7079
#[getset(get_mut = "pub", get = "pub", set = "pub")]
7180
layers: Vec<Descriptor>,
81+
/// This OPTIONAL property specifies a descriptor of another manifest. This value, used by the
82+
/// referrers API, indicates a relationship to the specified manifest.
83+
#[serde(skip_serializing_if = "Option::is_none")]
84+
#[getset(get = "pub", set = "pub")]
85+
#[builder(default)]
86+
subject: Option<Descriptor>,
7287
/// This OPTIONAL property contains arbitrary metadata for the image
7388
/// manifest. This OPTIONAL property MUST use the annotation
7489
/// rules.

0 commit comments

Comments
 (0)