♻️ refactor(cli): rename config_cli to rules_cli
- rename config_cli to rules_cli for better clarity - rename ConfigCommands to RulesCommands for better clarity - rename ConfigCli to RulesCli for better clarity
This commit is contained in:
committed by
Jeremiah Russell
parent
39da683fc0
commit
33027a6c34
@@ -1,25 +1,26 @@
|
||||
use clap::{Parser, Subcommand};
|
||||
use cull_gmail::Config;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ConfigCli {
|
||||
pub struct RulesCli {
|
||||
/// Configuration commands
|
||||
#[command(subcommand)]
|
||||
command: ConfigCommands,
|
||||
command: RulesCommands,
|
||||
}
|
||||
|
||||
impl ConfigCli {
|
||||
pub fn run(&self) {
|
||||
impl RulesCli {
|
||||
pub fn run(&self, config: Config) {
|
||||
match self.command {
|
||||
ConfigCommands::List => todo!(),
|
||||
ConfigCommands::Add => todo!(),
|
||||
ConfigCommands::Remove => todo!(),
|
||||
ConfigCommands::Update => todo!(),
|
||||
RulesCommands::List => config.list_rules(),
|
||||
RulesCommands::Add => todo!(),
|
||||
RulesCommands::Remove => todo!(),
|
||||
RulesCommands::Update => todo!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
pub enum ConfigCommands {
|
||||
pub enum RulesCommands {
|
||||
/// List the rules configured and saved in the config file
|
||||
#[clap(name = "list")]
|
||||
List,
|
||||
Reference in New Issue
Block a user