-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmod.rs
More file actions
49 lines (47 loc) · 1.45 KB
/
mod.rs
File metadata and controls
49 lines (47 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//! List Command Presentation Module
//!
//! This module implements the CLI presentation layer for the list command,
//! handling argument processing and user interaction.
//!
//! ## Architecture
//!
//! The list command presentation layer follows the DDD pattern, providing
//! a read-only view of all environments in the workspace.
//!
//! ## Components
//!
//! - `errors` - Presentation layer error types with `.help()` methods
//! - `handler` - Main command handler orchestrating the workflow
//!
//! ## Usage Example
//!
//! ### Basic Usage
//!
//! ```ignore
//! 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::list;
//! use torrust_tracker_deployer_lib::presentation::cli::views::VerbosityLevel;
//!
//! # fn main() {
//! let container = Container::new(VerbosityLevel::Normal, Path::new("."));
//! let context = ExecutionContext::new(Arc::new(container), global_args);
//!
//! // Call the list handler
//! if let Err(e) = context
//! .container()
//! .create_list_controller()
//! .execute()
//! {
//! eprintln!("List failed: {e}");
//! eprintln!("\n{}", e.help());
//! }
//! # }
//! ```
pub mod errors;
pub mod handler;
pub use handler::ListCommandController;
// Re-export commonly used types for convenience
pub use errors::ListSubcommandError;