oci_annotations/
lib.rs

1pub type DateTime = String;
2pub type Url = String;
3pub type Text = String;
4pub type SpdxLicenseExpression = String;
5pub type Version = String;
6
7/// metadata for an image
8/// based on [oci image spec annotations](https://github.com/opencontainers/image-spec/blob/v1.0/annotations.md)
9#[derive(Debug, ::serde::Serialize, ::serde::Deserialize)]
10pub struct Annotations {
11    /// the date and time on which the image was built (date-time string as defined by RFC 3339).
12    #[serde(rename = "org.opencontainers.image.created")]
13    pub created: Option<DateTime>,
14
15    /// contact details of the people or organization responsible for the image (freeform string)
16    #[serde(rename = "org.opencontainers.image.authors")]
17    pub authors: Option<Text>,
18
19    /// URL to find more information on the image
20    #[serde(rename = "org.opencontainers.image.url")]
21    pub url: Option<Url>,
22
23    /// Human-readable description of the software packaged in the image
24    #[serde(rename = "org.opencontainers.image.description")]
25    pub description: Option<Text>,
26
27    /// URL to get documentation on the image
28    #[serde(rename = "org.opencontainers.image.documentation")]
29    pub documentation: Option<Url>,
30
31    /// version of the packaged software
32    /// MAY match a label or tag in the source code repository
33    /// MAY be Semantic versioning-compatible
34    #[serde(rename = "org.opencontainers.image.version")]
35    pub version: Option<Version>,
36
37    /// License(s) under which contained software is distributed as an SPDX License Expression.
38    #[serde(rename = "org.opencontainers.image.licenses")]
39    pub licenses: Option<SpdxLicenseExpression>,
40
41    /// URL to get source code for building the image
42    #[serde(rename = "org.opencontainers.image.source")]
43    pub source: Option<Url>,
44
45    /// Name of the distributing entity, organization or individual.
46    #[serde(rename = "org.opencontainers.image.vendor")]
47    pub vendor: Option<Text>,
48
49    /// Human-readable title of the image
50    #[serde(rename = "org.opencontainers.image.title")]
51    pub title: Option<Text>,
52}