mirror of
https://github.com/YGGverse/btracker-gemini.git
synced 2026-03-31 17:15:30 +00:00
initial commit
This commit is contained in:
parent
fc65ac65d5
commit
1f2eb60318
8 changed files with 442 additions and 0 deletions
30
src/argument.rs
Normal file
30
src/argument.rs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
use clap::Parser;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[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, default_value_t = String::from("127.0.0.1:1965"))]
|
||||
pub bind: String,
|
||||
|
||||
/// Filepath to server identity in PKCS (PFX) format
|
||||
#[arg(short, long)]
|
||||
pub identity: PathBuf,
|
||||
|
||||
/// Passphrase to unlock encrypted identity
|
||||
#[arg(short, long, default_value_t = String::new())]
|
||||
pub password: String,
|
||||
|
||||
/// btracker-fs directory
|
||||
#[arg(short, long)]
|
||||
pub storage: PathBuf,
|
||||
|
||||
/// Listing items limit
|
||||
#[arg(short, long, default_value_t = 20)]
|
||||
pub limit: usize,
|
||||
|
||||
/// Default index capacity
|
||||
#[arg(short, long, default_value_t = 1000)]
|
||||
pub capacity: usize,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue