Skip to content

Commit

Permalink
index: support OCI Image Spec 1.1.0-rc5
Browse files Browse the repository at this point in the history
Signed-off-by: wayne warren <[email protected]>
  • Loading branch information
waynr committed Sep 25, 2023
1 parent b2d42de commit 1607425
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/image/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,24 @@ pub struct ImageIndex {
#[getset(get = "pub", set = "pub")]
#[builder(default)]
media_type: Option<MediaType>,
/// This OPTIONAL property contains the type of an artifact when the manifest is used for an
/// artifact. If defined, the value MUST comply with RFC 6838, including the naming
/// requirements in its section 4.2, and MAY be registered with IANA.
#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get = "pub", set = "pub")]
#[builder(default)]
artifact_type: Option<MediaType>,
/// This REQUIRED property contains a list of manifests for specific
/// platforms. While this property MUST be present, the size of
/// the array MAY be zero.
#[getset(get = "pub", set = "pub")]
manifests: Vec<Descriptor>,
/// This OPTIONAL property specifies a descriptor of another manifest. This value, used by the
/// referrers API, indicates a relationship to the specified manifest.
#[serde(skip_serializing_if = "Option::is_none")]
#[getset(get = "pub", set = "pub")]
#[builder(default)]
subject: Option<Descriptor>,
/// This OPTIONAL property contains arbitrary metadata for the image
/// index. This OPTIONAL property MUST use the annotation rules.
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down Expand Up @@ -191,6 +204,8 @@ impl Default for ImageIndex {
media_type: Default::default(),
manifests: Default::default(),
annotations: Default::default(),
artifact_type: Default::default(),
subject: Default::default(),
}
}
}
Expand Down

0 comments on commit 1607425

Please sign in to comment.