restic-wrapper/src/config.rs
Jan Christian Grünhage f05ca9da0b
initial commit
2024-02-03 14:16:04 +01:00

24 lines
492 B
Rust

use std::{path::PathBuf, collections::HashMap};
use serde::Deserialize;
#[derive(Deserialize)]
pub struct Config {
pub repositories: HashMap<String, Repository>,
pub sources: HashMap<String, Source>,
pub options: HashMap<String, String>,
}
#[derive(Deserialize)]
pub struct Repository {
pub url: String,
pub password: String,
}
#[derive(Deserialize)]
#[serde(untagged)]
pub enum Source {
Path { path: PathBuf },
Stdin { command: String, filename: PathBuf },
}