ips/pkg6depotd/src/cli.rs
Till Wegmueller f2a3bc4d7c
Introduce foundational structure for pkg6depotd
- Added initial implementation of the `pkg6depotd` server with modular components for CLI parsing, configuration management, HTTP handling, repository access, and daemonization.
- Implemented basic server startup logic with a default router and placeholder handlers.
- Integrated telemetry initialization and configuration fallback mechanism for ease of development.
- Updated `Cargo.toml` and `Cargo.lock` to include dependencies necessary for server functionality.
2025-12-08 20:11:05 +01:00

45 lines
910 B
Rust

use clap::{Parser, Subcommand};
use std::path::PathBuf;
#[derive(Parser)]
#[command(name = "pkg6depotd")]
#[command(about = "IPS Package Depot Server", long_about = None)]
pub struct Cli {
#[arg(short, long, value_name = "FILE")]
pub config: Option<PathBuf>,
#[arg(long)]
pub no_daemon: bool,
#[arg(long, value_name = "FILE")]
pub pid_file: Option<PathBuf>,
#[command(subcommand)]
pub command: Option<Commands>,
}
#[derive(Subcommand)]
pub enum Commands {
/// Start the server (default)
Start,
/// Stop the running server
Stop,
/// Check server status
Status,
/// Reload configuration
Reload,
/// Test configuration
ConfigTest,
/// Check health
Health,
/// Admin commands
Admin {
#[command(subcommand)]
cmd: AdminCommands,
},
}
#[derive(Subcommand)]
pub enum AdminCommands {
AuthCheck,
}