feat: validate configuration

This commit is contained in:
Marc Plano-Lesay 2025-05-21 22:02:42 +10:00
parent ee7d7971be
commit 48c670f455
Signed by: kernald
GPG key ID: 66A41B08CC62A6CF
33 changed files with 1076 additions and 165 deletions

View file

@ -1,15 +1,16 @@
use crate::app::Enableable;
use crate::config::types::{AbsoluteDownloadDir, Host, Password, Port, Username};
use serde::{Deserialize, Serialize};
/// Configuration for the Transmission action
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct TransmissionConfig {
pub enable: bool,
pub host: String,
pub username: String,
pub password: String,
pub port: u16,
pub download_dir: String,
pub host: Host,
pub username: Username,
pub password: Password,
pub port: Port,
pub download_dir: AbsoluteDownloadDir,
}
impl Enableable for TransmissionConfig {