pub commands (need later)

feature/configv2
prplV 2025-04-10 08:54:12 -04:00
parent 71acb4a32e
commit c50c444f21
1 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@ pub struct Cli {
subcommand, subcommand,
help = "to manage Noxis work", help = "to manage Noxis work",
)] )]
command : Commands, pub command : Commands,
} }
#[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)] #[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)]
@ -56,13 +56,13 @@ pub struct StartAction {
num_args = 1.., num_args = 1..,
value_delimiter = ' ' value_delimiter = ' '
)] )]
flags : Vec<String>, pub flags : Vec<String>,
} }
#[derive(Debug, Parser, serde::Serialize, serde::Deserialize)] #[derive(Debug, Parser, serde::Serialize, serde::Deserialize)]
pub struct ConfigCommand { pub struct ConfigCommand {
#[command(subcommand)] #[command(subcommand)]
action : ConfigAction, pub action : ConfigAction,
} }
#[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)] #[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)]
@ -89,12 +89,12 @@ pub struct LocalConfig {
action, action,
help = "to read following input as JSON", help = "to read following input as JSON",
)] )]
is_json : bool, pub is_json : bool,
// value // value
#[arg( #[arg(
help = "path to config file or config String (with --json flag)", help = "path to config file or config String (with --json flag)",
)] )]
config : String, pub config : String,
} }
#[derive(Debug, Parser, serde::Serialize, serde::Deserialize)] #[derive(Debug, Parser, serde::Serialize, serde::Deserialize)]
@ -102,16 +102,16 @@ pub struct ProcessCommand {
#[arg( #[arg(
help = "name of needed process", help = "name of needed process",
)] )]
process : String, pub process : String,
#[command( #[command(
subcommand, subcommand,
help = "To get current process's status", help = "To get current process's status",
)] )]
action : ProcessAction, pub action : ProcessAction,
} }
#[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)] #[derive(Debug, Subcommand, serde::Serialize, serde::Deserialize)]
enum ProcessAction { pub enum ProcessAction {
#[command( #[command(
about = "To get info about current process status", about = "To get info about current process status",
)] )]