feat: vertical slice — migrations, postgres adapters, presentation handlers, bootstrap wiring

This commit is contained in:
2026-05-31 05:52:42 +02:00
parent 201eff717d
commit 9aba393fde
11 changed files with 70 additions and 55 deletions

View File

@@ -1,5 +1,4 @@
use async_trait::async_trait;
use bytes::Bytes;
use domain::errors::DomainError;
use domain::ports::{DataStream, StorageReader, StorageWriter};
use futures::stream::StreamExt;

View File

@@ -44,12 +44,10 @@ impl FileStoragePort for LocalFileStorage {
async fn read_file(&self, path: &str) -> Result<Bytes, DomainError> {
let full = self.resolve(path)?;
let data = tokio::fs::read(&full)
.await
.map_err(|e| match e.kind() {
std::io::ErrorKind::NotFound => DomainError::NotFound(path.to_string()),
_ => DomainError::Internal(format!("Failed to read file: {e}")),
})?;
let data = tokio::fs::read(&full).await.map_err(|e| match e.kind() {
std::io::ErrorKind::NotFound => DomainError::NotFound(path.to_string()),
_ => DomainError::Internal(format!("Failed to read file: {e}")),
})?;
Ok(Bytes::from(data))
}