mirror of
https://github.com/YGGverse/titanit.git
synced 2026-03-31 17:15:30 +00:00
38 lines
1.1 KiB
Rust
38 lines
1.1 KiB
Rust
use clap::Parser;
|
|
|
|
#[derive(Parser, Debug)]
|
|
#[command(version, about, long_about = None)]
|
|
pub struct Argument {
|
|
/// Bind server `host:port` to listen incoming connections on it
|
|
#[arg(short, long)]
|
|
pub bind: String,
|
|
|
|
/// Filepath to server identity in PKCS (PFX) format
|
|
#[arg(short, long)]
|
|
pub identity: String,
|
|
|
|
/// Passphrase to unlock encrypted identity
|
|
#[arg(short, long, default_value_t = String::new())]
|
|
pub password: String,
|
|
|
|
/// Uploads directory (e.g. `public` directory)
|
|
#[arg(short, long, default_value_t = String::from("public"))]
|
|
pub directory: String,
|
|
|
|
/// Uploads max size limit in bytes (unlimited by default)
|
|
#[arg(short, long)]
|
|
pub size: Option<usize>,
|
|
|
|
/// Buffer chunk size (`1024` by default)
|
|
#[arg(short, long, default_value_t = 1024)]
|
|
pub chunk: usize,
|
|
|
|
/// Uploads MIME type allowed (comma separated, all by default)
|
|
/// * based on headers
|
|
#[arg(short, long)]
|
|
pub mime: Option<String>,
|
|
|
|
/// Redirection URL on request handle complete (e.g. `gemini://localhost`)
|
|
#[arg(short, long)]
|
|
pub redirect: Option<String>,
|
|
}
|