2021-02-10 02:47:40 +00:00
|
|
|
use serde::Deserialize;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
/// SFTP Config
|
|
|
|
#[derive(Debug, Deserialize, Clone)]
|
|
|
|
pub struct SFTPConfig {
|
|
|
|
/// Remote server address
|
|
|
|
pub server_addr: String,
|
|
|
|
/// Remote output directory
|
|
|
|
pub remote_dir: PathBuf,
|
|
|
|
/// Remote server username
|
|
|
|
pub username: String,
|
|
|
|
/// Public key for key auth
|
|
|
|
pub public_key: Option<PathBuf>,
|
|
|
|
/// Private key for key auth
|
|
|
|
pub private_key: Option<PathBuf>,
|
|
|
|
/// Password if using password auth
|
|
|
|
pub password: Option<String>,
|
|
|
|
}
|
|
|
|
|
2021-02-13 02:02:57 +00:00
|
|
|
/// FTP Config
|
2021-02-10 02:47:40 +00:00
|
|
|
#[derive(Debug, Deserialize, Clone)]
|
2021-02-13 02:02:57 +00:00
|
|
|
pub struct FTPConfig {
|
2021-02-10 02:47:40 +00:00
|
|
|
/// Remote server address
|
|
|
|
pub server_addr: String,
|
|
|
|
/// Remote output directory
|
|
|
|
pub remote_dir: PathBuf,
|
|
|
|
/// Remote server username
|
|
|
|
pub username: String,
|
|
|
|
/// Password
|
|
|
|
pub password: String,
|
|
|
|
}
|
2021-09-19 19:56:30 +00:00
|
|
|
|
|
|
|
/// File Config
|
|
|
|
#[derive(Debug, Deserialize, Clone)]
|
|
|
|
pub struct FileConfig {
|
|
|
|
/// Path to backup to
|
|
|
|
pub path: PathBuf,
|
|
|
|
}
|