Skip to main content

torrust_tracker_deployer_lib/presentation/cli/controllers/show/
mod.rs

1//! Show Command Presentation Module
2//!
3//! This module implements the CLI presentation layer for the show command,
4//! handling argument processing and user interaction.
5//!
6//! ## Architecture
7//!
8//! The show command presentation layer follows the DDD pattern, providing
9//! a read-only view of stored environment data without remote verification.
10//!
11//! ## Components
12//!
13//! - `errors` - Presentation layer error types with `.help()` methods
14//! - `handler` - Main command handler orchestrating the workflow
15//!
16//! ## Usage Example
17//!
18//! ### Basic Usage
19//!
20//! ```ignore
21//! use std::path::Path;
22//! use std::sync::Arc;
23//! use torrust_tracker_deployer_lib::bootstrap::Container;
24//! use torrust_tracker_deployer_lib::presentation::cli::dispatch::ExecutionContext;
25//! use torrust_tracker_deployer_lib::presentation::cli::controllers::show;
26//! use torrust_tracker_deployer_lib::presentation::cli::views::VerbosityLevel;
27//!
28//! # fn main() {
29//! let container = Container::new(VerbosityLevel::Normal, Path::new("."));
30//! let context = ExecutionContext::new(Arc::new(container), global_args);
31//!
32//! // Call the show handler
33//! if let Err(e) = context
34//!     .container()
35//!     .create_show_controller()
36//!     .execute("my-environment")
37//! {
38//!     eprintln!("Show failed: {e}");
39//!     eprintln!("\n{}", e.help());
40//! }
41//! # }
42//! ```
43
44pub mod errors;
45pub mod handler;
46pub use handler::ShowCommandController;
47
48// Re-export commonly used types for convenience
49pub use errors::ShowSubcommandError;