Skip to content

Commit e06b670

Browse files
committed
feat: add Username domain type for Linux system usernames
Add new domain type to replace hardcoded username strings: - Username validation following Linux naming requirements - Generic constructor accepting Into<String> for better ergonomics - Explicit error handling with UsernameError enum - Comprehensive test suite with 27 username-specific tests - Support for serde serialization/deserialization - Complete trait implementations (Display, FromStr, AsRef, etc.) This provides type safety and validation for system usernames used in deployment and infrastructure management.
1 parent 18e275b commit e06b670

File tree

2 files changed

+471
-0
lines changed

2 files changed

+471
-0
lines changed

src/domain/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
//! ## Components
77
//!
88
//! - `template` - Core template domain models and business logic
9+
//! - `username` - Linux system username validation and management
910
1011
pub mod template;
12+
pub mod username;
1113

1214
// Re-export commonly used domain types for convenience
1315
pub use template::{TemplateEngine, TemplateEngineError, TemplateManager, TemplateManagerError};
16+
pub use username::{Username, UsernameError};

0 commit comments

Comments
 (0)