todo: exporter

This commit is contained in:
2026-05-09 14:30:11 +02:00
parent ebab30b1ea
commit 6cd332f758
6 changed files with 96 additions and 16 deletions

View File

@@ -0,0 +1,23 @@
use std::sync::Arc;
use domain::{
errors::DomainError,
ports::{DiaryExporter, MovieRepository},
};
use crate::commands::ExportCommand;
pub struct ExportDiary {
repository: Arc<dyn MovieRepository>,
exporter: Arc<dyn DiaryExporter>,
}
impl ExportDiary {
pub async fn execute(&self, req: ExportCommand) -> Result<Vec<u8>, DomainError> {
// 1. fetch all diary entries for the user
// 2. delegate serialization to the port (exporter)
// Return bytes of the exported diary, which can be written to a file or returned in an HTTP response
Ok(vec![])
}
}