40 lines
946 B
Rust
40 lines
946 B
Rust
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>,
|
|
}
|
|
|
|
/// FTP Config
|
|
#[derive(Debug, Deserialize, Clone)]
|
|
pub struct FTPConfig {
|
|
/// Remote server address
|
|
pub server_addr: String,
|
|
/// Remote output directory
|
|
pub remote_dir: PathBuf,
|
|
/// Remote server username
|
|
pub username: String,
|
|
/// Password
|
|
pub password: String,
|
|
}
|
|
|
|
/// File Config
|
|
#[derive(Debug, Deserialize, Clone)]
|
|
pub struct FileConfig {
|
|
/// Path to backup to
|
|
pub path: PathBuf,
|
|
}
|