refactor: rename ImageStorage → ObjectStorage
Some checks failed
CI / Check / Test (push) Failing after 46s
Some checks failed
CI / Check / Test (push) Failing after 46s
This commit is contained in:
@@ -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>;
|
||||
|
||||
@@ -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}"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user