summaryrefslogtreecommitdiff
path: root/src/cmd/list.rs
blob: 1741bce130751ced16b4f227c7c3de96d404b5dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::client::{BackupClient, ClientConfig};
use std::path::Path;

pub fn list(config: &Path) -> anyhow::Result<()> {
    let config = ClientConfig::read_config(&config)?;
    let client = BackupClient::new(&config.server_url)?;

    for gen_id in client.list_generations()? {
        println!("{}", gen_id);
    }

    Ok(())
}