diff --git a/src/bin/evebox.rs b/src/bin/evebox.rs index a8fa1228..b1c4b9ef 100644 --- a/src/bin/evebox.rs +++ b/src/bin/evebox.rs @@ -292,11 +292,11 @@ async fn evebox_main() -> Result<(), Box> { let mut parser = parser .subcommand(server) .subcommand(oneshot) - .subcommand(evebox::commands::agent::command()) - .subcommand(evebox::commands::config::config_subcommand()) - .subcommand(evebox::commands::print::command()) - .subcommand(evebox::commands::elastic::main::main_options()) - .subcommand(evebox::commands::sqlite::command()); + .subcommand(evebox::cli::agent::command()) + .subcommand(evebox::cli::config::config_subcommand()) + .subcommand(evebox::cli::print::command()) + .subcommand(evebox::cli::elastic::main::main_options()) + .subcommand(evebox::cli::sqlite::command()); let matches = parser.clone().get_matches(); // Initialize logging. @@ -322,12 +322,12 @@ async fn evebox_main() -> Result<(), Box> { version::print_version(); Ok(()) } - Some(("oneshot", args)) => evebox::commands::oneshot::main(args).await, - Some(("agent", args)) => evebox::commands::agent::main(args).await, - Some(("config", args)) => evebox::commands::config::main(args).await, - Some(("print", args)) => evebox::commands::print::main(args), - Some(("elastic", args)) => evebox::commands::elastic::main::main(args).await, - Some(("sqlite", args)) => evebox::commands::sqlite::main(args).await, + Some(("oneshot", args)) => evebox::cli::oneshot::main(args).await, + Some(("agent", args)) => evebox::cli::agent::main(args).await, + Some(("config", args)) => evebox::cli::config::main(args).await, + Some(("print", args)) => evebox::cli::print::main(args), + Some(("elastic", args)) => evebox::cli::elastic::main::main(args).await, + Some(("sqlite", args)) => evebox::cli::sqlite::main(args).await, _ => { parser.print_help().ok(); println!(); diff --git a/src/commands/agent.rs b/src/cli/agent.rs similarity index 100% rename from src/commands/agent.rs rename to src/cli/agent.rs diff --git a/src/commands/config/mod.rs b/src/cli/config/mod.rs similarity index 100% rename from src/commands/config/mod.rs rename to src/cli/config/mod.rs diff --git a/src/commands/config/users.rs b/src/cli/config/users.rs similarity index 100% rename from src/commands/config/users.rs rename to src/cli/config/users.rs diff --git a/src/commands/elastic/info.rs b/src/cli/elastic/info.rs similarity index 100% rename from src/commands/elastic/info.rs rename to src/cli/elastic/info.rs diff --git a/src/commands/elastic/main.rs b/src/cli/elastic/main.rs similarity index 97% rename from src/commands/elastic/main.rs rename to src/cli/elastic/main.rs index 0af0ed4f..59d60dad 100644 --- a/src/commands/elastic/main.rs +++ b/src/cli/elastic/main.rs @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: (C) 2022 Jason Ish // SPDX-License-Identifier: MIT -use crate::commands::elastic::info; +use crate::cli::elastic::info; use clap::{Command, CommandFactory, FromArgMatches, Parser, Subcommand}; use super::set_field_limit; diff --git a/src/commands/elastic/mod.rs b/src/cli/elastic/mod.rs similarity index 100% rename from src/commands/elastic/mod.rs rename to src/cli/elastic/mod.rs diff --git a/src/commands/elastic/set_field_limit.rs b/src/cli/elastic/set_field_limit.rs similarity index 100% rename from src/commands/elastic/set_field_limit.rs rename to src/cli/elastic/set_field_limit.rs diff --git a/src/commands/mod.rs b/src/cli/mod.rs similarity index 100% rename from src/commands/mod.rs rename to src/cli/mod.rs diff --git a/src/commands/oneshot.rs b/src/cli/oneshot.rs similarity index 100% rename from src/commands/oneshot.rs rename to src/cli/oneshot.rs diff --git a/src/commands/print.rs b/src/cli/print.rs similarity index 100% rename from src/commands/print.rs rename to src/cli/print.rs diff --git a/src/commands/sqlite/fts.rs b/src/cli/sqlite/fts.rs similarity index 100% rename from src/commands/sqlite/fts.rs rename to src/cli/sqlite/fts.rs diff --git a/src/commands/sqlite/mod.rs b/src/cli/sqlite/mod.rs similarity index 100% rename from src/commands/sqlite/mod.rs rename to src/cli/sqlite/mod.rs diff --git a/src/lib.rs b/src/lib.rs index 38423f4a..850b3853 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,7 @@ pub mod logger; pub mod agent; pub mod bookmark; pub(crate) mod cert; -pub mod commands; +pub mod cli; pub mod config; pub(crate) mod datetime; mod elastic;