|
28 | 28 | use anyhow::anyhow; |
29 | 29 | use containers_image_proxy::oci_spec; |
30 | 30 | use ostree::glib; |
| 31 | +use serde::Serialize; |
31 | 32 |
|
32 | 33 | use std::borrow::Cow; |
33 | 34 | use std::collections::HashMap; |
@@ -295,27 +296,31 @@ impl std::fmt::Display for OstreeImageReference { |
295 | 296 | } |
296 | 297 |
|
297 | 298 | /// Represents the difference in layer/blob content between two OCI image manifests. |
298 | | -#[derive(Debug)] |
| 299 | +#[derive(Debug, Serialize)] |
299 | 300 | pub struct ManifestDiff<'a> { |
300 | 301 | /// The source container image manifest. |
| 302 | + #[serde(skip)] |
301 | 303 | pub from: &'a oci_spec::image::ImageManifest, |
302 | 304 | /// The target container image manifest. |
| 305 | + #[serde(skip)] |
303 | 306 | pub to: &'a oci_spec::image::ImageManifest, |
304 | 307 | /// Layers which are present in the old image but not the new image. |
| 308 | + #[serde(skip)] |
305 | 309 | pub removed: Vec<&'a oci_spec::image::Descriptor>, |
306 | 310 | /// Layers which are present in the new image but not the old image. |
| 311 | + #[serde(skip)] |
307 | 312 | pub added: Vec<&'a oci_spec::image::Descriptor>, |
308 | | - /// Total number of packages |
| 313 | + /// Total number of layers |
309 | 314 | pub total: u64, |
310 | | - /// Size of total number of packages. |
| 315 | + /// Size of total number of layers. |
311 | 316 | pub total_size: u64, |
312 | | - /// Number of packages removed |
| 317 | + /// Number of layers removed |
313 | 318 | pub n_removed: u64, |
314 | | - /// Size of the number of packages removed |
| 319 | + /// Size of the number of layers removed |
315 | 320 | pub removed_size: u64, |
316 | 321 | /// Number of packages added |
317 | 322 | pub n_added: u64, |
318 | | - /// Size of the number of packages added |
| 323 | + /// Size of the number of layers added |
319 | 324 | pub added_size: u64, |
320 | 325 | } |
321 | 326 |
|
|
0 commit comments