refactor: new directory structure where the flake module lives in a directory with the template in a subdirectory

This commit is contained in:
2026-04-26 18:40:32 -05:00
parent 36ac1b58d6
commit fbaed7851b
11 changed files with 2 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
use clap::{Args, Parser, Subcommand};
use thiserror::Error;
use tracing::Level;
#[derive(Debug, Parser)]
#[clap(version, about)]
pub struct CommandArgs {
/// The path to a TOML or JSON configuration to use. This will me merged with all other configuration sources, taking priority over other files but not environment variables
#[arg(short, long)]
pub config: Option<String>,
#[clap(subcommand)]
pub action: ActionType,
}
#[derive(Debug, Subcommand)]
pub enum ActionType {
/// Run the daemon and listen for requests
Serve(ServeAction),
}
#[derive(Debug, Args)]
pub struct ServeAction {
/// The log level to use for the server
#[arg(short, long, default_value_t = Level::WARN)]
pub log_level: Level,
}
#[derive(Error, Debug)]
pub enum ArgsError {
#[error("the file extension of the provided config file is not one of .json or .toml")]
InvalidConfigExtension(Option<String>),
}