Skip to main content

borgbackup/output/
list.rs

1//! Output from the borg list command
2
3use chrono::NaiveDateTime;
4use serde::{Deserialize, Serialize};
5
6use crate::output::common::{Encryption, Repository};
7
8/// Output of the borg list command
9#[derive(Serialize, Deserialize, Debug, Clone)]
10pub struct ListRepository {
11    /// Information about the repository
12    pub repository: Repository,
13    /// Information about the encryption of the repository
14    pub encryption: Option<Encryption>,
15    /// Information about the archives in the repository
16    pub archives: Vec<ListArchive>,
17}
18
19/// The short output version of the archive
20#[derive(Serialize, Deserialize, Debug, Clone)]
21pub struct ListArchive {
22    /// Hexadecimal archive ID
23    pub id: String,
24    /// Name of the archive
25    pub name: String,
26    /// Start timestamp
27    pub start: NaiveDateTime,
28}