refactoring hexagonal and clean architecture

This commit is contained in:
Diocrafts
2026-02-08 13:40:23 +01:00
parent 3e4fb67c19
commit a82faa5eaf
101 changed files with 7433 additions and 9721 deletions
+24
View File
@@ -0,0 +1,24 @@
//! ZIP Port - Application layer abstraction for ZIP archive creation.
//!
//! This module defines the port (trait) for ZIP operations,
//! keeping the interface layer independent of specific ZIP
//! implementation details.
use async_trait::async_trait;
use crate::common::errors::DomainError;
/// Port for ZIP archive operations.
///
/// Implementations handle the actual ZIP file creation, compression,
/// and recursive folder traversal.
#[async_trait]
pub trait ZipPort: Send + Sync + 'static {
/// Create a ZIP archive containing the contents of a folder (recursively).
///
/// Returns the ZIP file bytes.
async fn create_folder_zip(
&self,
folder_id: &str,
folder_name: &str,
) -> Result<Vec<u8>, DomainError>;
}