refactor: rename ImageStorage → ObjectStorage
Some checks failed
CI / Check / Test (push) Failing after 46s

This commit is contained in:
2026-06-03 01:33:08 +02:00
parent d94ccbe057
commit f262417971
23 changed files with 79 additions and 79 deletions

View File

@@ -184,7 +184,7 @@ pub trait PosterFetcherClient: Send + Sync {
}
#[async_trait]
pub trait ImageStorage: Send + Sync {
pub trait ObjectStorage: Send + Sync {
/// Stores `image_bytes` at `key` and returns the stored key.
async fn store(&self, key: &str, image_bytes: &[u8]) -> Result<String, DomainError>;
async fn get(&self, key: &str) -> Result<Vec<u8>, DomainError>;

View File

@@ -20,7 +20,7 @@ use crate::{
},
ports::{
AuthService, DiaryExporter, DiaryRepository, DocumentParser, EventPublisher, FeedSortBy,
FollowingFilter, GeneratedToken, ImageStorage, ImportProfileRepository,
FollowingFilter, GeneratedToken, ObjectStorage, ImportProfileRepository,
ImportSessionRepository, MetadataClient, MetadataSearchCriteria, MovieProfileRepository,
MovieRepository, PasswordHasher, PersonCommand, PersonQuery, PosterFetcherClient,
ReviewRepository, SearchCommand, SearchPort, StatsRepository, UserProfileFieldsRepository,
@@ -351,12 +351,12 @@ impl EventPublisher for NoopEventPublisher {
}
}
// ── NoopImageStorage ──────────────────────────────────────────────────────────
// ── NoopObjectStorage ──────────────────────────────────────────────────────────
pub struct NoopImageStorage;
pub struct NoopObjectStorage;
#[async_trait]
impl ImageStorage for NoopImageStorage {
impl ObjectStorage for NoopObjectStorage {
async fn store(&self, key: &str, _image_bytes: &[u8]) -> Result<String, DomainError> {
Ok(format!("noop://{key}"))
}