Expand description
Show Command Presentation Module
This module implements the CLI presentation layer for the show command, handling argument processing and user interaction.
§Architecture
The show command presentation layer follows the DDD pattern, providing a read-only view of stored environment data without remote verification.
§Components
errors- Presentation layer error types with.help()methodshandler- Main command handler orchestrating the workflow
§Usage Example
§Basic Usage
ⓘ
use std::path::Path;
use std::sync::Arc;
use torrust_tracker_deployer_lib::bootstrap::Container;
use torrust_tracker_deployer_lib::presentation::cli::dispatch::ExecutionContext;
use torrust_tracker_deployer_lib::presentation::cli::controllers::show;
use torrust_tracker_deployer_lib::presentation::cli::views::VerbosityLevel;
let container = Container::new(VerbosityLevel::Normal, Path::new("."));
let context = ExecutionContext::new(Arc::new(container), global_args);
// Call the show handler
if let Err(e) = context
.container()
.create_show_controller()
.execute("my-environment")
{
eprintln!("Show failed: {e}");
eprintln!("\n{}", e.help());
}Re-exports§
pub use handler::ShowCommandController;pub use errors::ShowSubcommandError;