torrust_tracker_deployer_lib/presentation/cli/mod.rs
1//! CLI Delivery Mechanism
2//!
3//! This module contains the CLI-specific presentation code that implements the
4//! command-line interface for the deployer. It follows a four-layer MVC architecture:
5//!
6//! ```text
7//! Input → Dispatch → Controllers → Views
8//! ```
9//!
10//! | Layer | Purpose |
11//! |-----------------|------------------------------------------------|
12//! | **Input** | CLI argument parsing and validation (Clap) |
13//! | **Dispatch** | Command routing and execution context |
14//! | **Controllers** | Command handling and business logic coordination |
15//! | **Views** | Output formatting and presentation |
16
17pub mod controllers;
18pub mod dispatch;
19pub mod error;
20pub mod errors;
21pub mod input;
22pub mod views;
23
24// Re-export commonly used CLI types for convenience
25pub use controllers::create::{
26 CreateCommandError, CreateEnvironmentCommandError, CreateEnvironmentTemplateCommandError,
27};
28pub use controllers::destroy::DestroySubcommandError;
29pub use error::handle_error;
30pub use errors::CommandError;
31pub use input::{Cli, Commands, GlobalArgs};
32pub use views::progress::ProgressReporter;
33pub use views::{Theme, UserOutput, VerbosityLevel};
34
35#[cfg(test)]
36mod tests {
37 mod reentrancy_fix_test;
38}