-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmod.rs
More file actions
51 lines (48 loc) · 1.49 KB
/
mod.rs
File metadata and controls
51 lines (48 loc) · 1.49 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
50
51
//! Run Command Presentation Module
//!
//! This module implements the CLI presentation layer for the run command,
//! handling argument processing and user interaction.
//!
//! ## Architecture
//!
//! The run command presentation layer follows the DDD pattern, orchestrating
//! the application layer's `RunCommandHandler` while providing user-friendly
//! output and error handling.
//!
//! ## 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::run;
//! use torrust_tracker_deployer_lib::presentation::cli::views::VerbosityLevel;
//!
//! # #[tokio::main]
//! # async fn main() {
//! let container = Container::new(VerbosityLevel::Normal, Path::new("."));
//! let context = ExecutionContext::new(Arc::new(container), global_args);
//!
//! // Call the run handler
//! let result = context
//! .container()
//! .create_run_controller()
//! .execute("my-environment")
//! .await;
//! # }
//! ```
pub mod errors;
pub mod handler;
pub use handler::RunCommandController;
#[cfg(test)]
mod tests;
// Re-export commonly used types for convenience
pub use errors::RunSubcommandError;