Skip to content

Commit e079adb

Browse files
committed
refactor: move remote action validators to validators submodule
1 parent 0e85a6d commit e079adb

File tree

7 files changed

+22
-16
lines changed

7 files changed

+22
-16
lines changed

docs/codebase-architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ Application-specific template rendering and configuration for external tools:
346346
**Level 3: Remote System Operations:**
347347

348348
-`src/infrastructure/remote_actions/mod.rs` - Remote operations root
349-
-`src/infrastructure/remote_actions/cloud_init.rs` - Validate cloud-init completion
350-
-`src/infrastructure/remote_actions/docker.rs` - Verify Docker installation
351-
-`src/infrastructure/remote_actions/docker_compose.rs` - Validate Docker Compose
349+
-`src/infrastructure/remote_actions/validators/cloud_init.rs` - Validate cloud-init completion
350+
-`src/infrastructure/remote_actions/validators/docker.rs` - Verify Docker installation
351+
-`src/infrastructure/remote_actions/validators/docker_compose.rs` - Validate Docker Compose
352352

353353
**Persistence Layer:**
354354

src/infrastructure/remote_actions/mod.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
//!
77
//! ## Available Remote Actions
88
//!
9-
//! - `cloud_init` - Cloud-init status checking and validation
10-
//! - `docker` - Docker installation and service management
11-
//! - `docker_compose` - Docker Compose installation and validation
9+
//! - `validators::cloud_init` - Cloud-init status checking and validation
10+
//! - `validators::docker` - Docker installation and service management
11+
//! - `validators::docker_compose` - Docker Compose installation and validation
1212
//!
1313
//! ## Architecture Pattern
1414
//!
@@ -26,6 +26,13 @@ use thiserror::Error;
2626

2727
use crate::shared::command::CommandError;
2828

29+
pub mod validators;
30+
31+
pub use validators::cloud_init::CloudInitValidator;
32+
pub use validators::docker::DockerValidator;
33+
pub use validators::docker_compose::DockerComposeValidator;
34+
pub use validators::running_services::RunningServicesValidator;
35+
2936
/// Errors that can occur during remote action execution
3037
#[derive(Error, Debug)]
3138
pub enum RemoteActionError {
@@ -52,16 +59,6 @@ pub enum RemoteActionError {
5259
},
5360
}
5461

55-
pub mod cloud_init;
56-
pub mod docker;
57-
pub mod docker_compose;
58-
pub mod running_services;
59-
60-
pub use cloud_init::CloudInitValidator;
61-
pub use docker::DockerValidator;
62-
pub use docker_compose::DockerComposeValidator;
63-
pub use running_services::RunningServicesValidator;
64-
6562
/// Trait for remote actions that can be executed on a server via SSH
6663
///
6764
/// Remote actions are lightweight scripts that connect to a provisioned
File renamed without changes.
File renamed without changes.

src/infrastructure/remote_actions/docker_compose.rs renamed to src/infrastructure/remote_actions/validators/docker_compose.rs

File renamed without changes.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pub mod cloud_init;
2+
pub mod docker;
3+
pub mod docker_compose;
4+
pub mod running_services;
5+
6+
pub use cloud_init::CloudInitValidator;
7+
pub use docker::DockerValidator;
8+
pub use docker_compose::DockerComposeValidator;
9+
pub use running_services::RunningServicesValidator;

src/infrastructure/remote_actions/running_services.rs renamed to src/infrastructure/remote_actions/validators/running_services.rs

File renamed without changes.

0 commit comments

Comments
 (0)