restructure
This commit is contained in:
@@ -8,16 +8,17 @@ use uuid::Uuid;
|
||||
use crate::{
|
||||
errors::DomainError,
|
||||
models::{
|
||||
AnnotatedRow, DiaryEntry, DiaryFilter, ExternalPersonId, FeedEntry, FieldMapping,
|
||||
FileFormat, ImportError, ImportRow, Movie, MovieProfile, MovieStats, ParsedFile, Person,
|
||||
PersonCredits, PersonId, Review, ReviewHistory, RowResult, SearchQuery, SearchResults,
|
||||
UserStats, UserTrends,
|
||||
AnnotatedRow, DiaryEntry, DiaryFilter, ExternalPersonId, FeedEntry, FeedSortBy,
|
||||
FieldMapping, FileFormat, FollowingFilter, GeneratedToken, ImportError, ImportRow,
|
||||
MetadataSearchCriteria, Movie, MovieProfile, MovieStats, ParsedFile, Person, PersonCredits,
|
||||
PersonId, Review, ReviewHistory, RowResult, SearchQuery, SearchResults, UserStats,
|
||||
UserTrends,
|
||||
collections::{PageParams, Paginated},
|
||||
},
|
||||
ports::{
|
||||
AuthService, DiaryRepository, DocumentParser, FeedSortBy, FollowingFilter, GeneratedToken,
|
||||
MetadataClient, MetadataSearchCriteria, MovieEnrichmentClient, PasswordHasher, PersonQuery,
|
||||
PosterFetcherClient, SearchCommand, SearchPort, StatsRepository,
|
||||
AuthService, DiaryRepository, DocumentParser, MetadataClient, MovieEnrichmentClient,
|
||||
PasswordHasher, PersonQuery, PosterFetcherClient, SearchCommand, SearchPort,
|
||||
StatsRepository,
|
||||
},
|
||||
value_objects::{ExternalMetadataId, MovieId, PasswordHash, PosterUrl, UserId},
|
||||
};
|
||||
|
||||
@@ -12,16 +12,16 @@ use crate::{
|
||||
errors::DomainError,
|
||||
events::DomainEvent,
|
||||
models::{
|
||||
Goal, ImportProfile, ImportSession, Movie, MovieFilter, MovieProfile, MovieSummary,
|
||||
ProfileField, RefreshSession, Review, User, UserSettings, UserSummary, WatchEvent,
|
||||
WatchEventStatus, WatchlistEntry, WatchlistWithMovie, WebhookToken,
|
||||
FederationFlags, Goal, ImportProfile, ImportSession, Movie, MovieFilter, MovieProfile,
|
||||
MovieSummary, ProfileField, RefreshSession, Review, User, UserSettings, UserSummary,
|
||||
WatchEvent, WatchEventStatus, WatchlistEntry, WatchlistWithMovie, WebhookToken,
|
||||
collections::{PageParams, Paginated},
|
||||
},
|
||||
ports::{
|
||||
FederationFlags, GoalRepository, ImportProfileRepository, ImportSessionRepository,
|
||||
MovieProfileRepository, MovieRepository, RefreshSessionRepository, ReviewRepository,
|
||||
UserFederationSettingsQuery, UserProfileFieldsRepository, UserRepository,
|
||||
UserSettingsRepository, WatchEventRepository, WatchlistRepository, WebhookTokenRepository,
|
||||
GoalRepository, ImportProfileRepository, ImportSessionRepository, MovieProfileRepository,
|
||||
MovieRepository, RefreshSessionRepository, ReviewRepository, UserFederationSettingsQuery,
|
||||
UserProfileFieldsRepository, UserRepository, UserSettingsRepository, WatchEventRepository,
|
||||
WatchlistRepository, WebhookTokenRepository,
|
||||
},
|
||||
value_objects::{
|
||||
Email, ExternalMetadataId, GoalId, ImportProfileId, ImportSessionId, MovieId, MovieTitle,
|
||||
|
||||
@@ -102,7 +102,7 @@ impl crate::ports::SocialQueryPort for NoopSocialQueryPort {
|
||||
}
|
||||
async fn list_all_followed_remote_actors(
|
||||
&self,
|
||||
) -> Result<Vec<crate::ports::RemoteActorInfo>, DomainError> {
|
||||
) -> Result<Vec<crate::models::RemoteActorInfo>, DomainError> {
|
||||
Ok(vec![])
|
||||
}
|
||||
async fn count_following(&self, _: uuid::Uuid) -> Result<usize, DomainError> {
|
||||
@@ -114,7 +114,7 @@ impl crate::ports::SocialQueryPort for NoopSocialQueryPort {
|
||||
async fn get_pending_followers(
|
||||
&self,
|
||||
_: uuid::Uuid,
|
||||
) -> Result<Vec<crate::ports::PendingFollowerInfo>, DomainError> {
|
||||
) -> Result<Vec<crate::models::PendingFollowerInfo>, DomainError> {
|
||||
Ok(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,17 +4,17 @@ use crate::{
|
||||
errors::DomainError,
|
||||
models::{
|
||||
AnnotatedRow, DiaryEntry, DiaryFilter, EntityType, ExportFormat, ExternalPersonId,
|
||||
FeedEntry, FieldMapping, FileFormat, ImportError, ImportProfile, ImportSession,
|
||||
IndexableDocument, MovieProfile, MovieStats, ParsedFile, Person, PersonCredits,
|
||||
PersonEnrichmentData, PersonId, RefreshSession, ReviewHistory, SearchQuery, SearchResults,
|
||||
UserStats, UserTrends,
|
||||
FeedEntry, FeedSortBy, FieldMapping, FileFormat, FollowingFilter, ImportError,
|
||||
ImportProfile, ImportSession, IndexableDocument, MovieProfile, MovieStats, ParsedFile,
|
||||
PendingFollowerInfo, Person, PersonCredits, PersonEnrichmentData, PersonId, RefreshSession,
|
||||
RemoteActorInfo, ReviewHistory, SearchQuery, SearchResults, UserStats, UserTrends,
|
||||
collections::{PageParams, Paginated},
|
||||
},
|
||||
ports::{
|
||||
DiaryExporter, DiaryRepository, DocumentParser, FeedSortBy, FollowingFilter,
|
||||
ImportProfileRepository, ImportSessionRepository, MovieProfileRepository, PersonCommand,
|
||||
PersonQuery, PosterFetcherClient, RefreshSessionRepository, SearchCommand, SearchPort,
|
||||
StatsRepository, UserProfileFieldsRepository,
|
||||
DiaryExporter, DiaryRepository, DocumentParser, ImportProfileRepository,
|
||||
ImportSessionRepository, MovieProfileRepository, PersonCommand, PersonQuery,
|
||||
PosterFetcherClient, RefreshSessionRepository, SearchCommand, SearchPort, StatsRepository,
|
||||
UserProfileFieldsRepository,
|
||||
},
|
||||
value_objects::{ImportProfileId, ImportSessionId, MovieId, PosterUrl, UserId},
|
||||
};
|
||||
@@ -330,9 +330,7 @@ impl crate::ports::SocialQueryPort for PanicSocialQueryPort {
|
||||
async fn get_accepted_following_urls(&self, _: uuid::Uuid) -> Result<Vec<String>, DomainError> {
|
||||
panic!("PanicSocialQueryPort called")
|
||||
}
|
||||
async fn list_all_followed_remote_actors(
|
||||
&self,
|
||||
) -> Result<Vec<crate::ports::RemoteActorInfo>, DomainError> {
|
||||
async fn list_all_followed_remote_actors(&self) -> Result<Vec<RemoteActorInfo>, DomainError> {
|
||||
panic!("PanicSocialQueryPort called")
|
||||
}
|
||||
async fn count_following(&self, _: uuid::Uuid) -> Result<usize, DomainError> {
|
||||
@@ -344,7 +342,7 @@ impl crate::ports::SocialQueryPort for PanicSocialQueryPort {
|
||||
async fn get_pending_followers(
|
||||
&self,
|
||||
_: uuid::Uuid,
|
||||
) -> Result<Vec<crate::ports::PendingFollowerInfo>, DomainError> {
|
||||
) -> Result<Vec<PendingFollowerInfo>, DomainError> {
|
||||
panic!("PanicSocialQueryPort called")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ impl crate::ports::WrapUpStatsQuery for PanicWrapUpStatsQuery {
|
||||
&self,
|
||||
_: &crate::models::wrapup::WrapUpScope,
|
||||
_: &crate::models::wrapup::DateRange,
|
||||
) -> Result<Vec<crate::ports::WrapUpMovieRow>, DomainError> {
|
||||
) -> Result<Vec<crate::models::WrapUpMovieRow>, DomainError> {
|
||||
unimplemented!("WrapUpStatsQuery not wired")
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ impl crate::ports::WrapUpStatsQuery for PanicWrapUpStatsQuery {
|
||||
// ── InMemoryWrapUpStatsQuery ────────────────────────────────────────────────
|
||||
|
||||
pub struct InMemoryWrapUpStatsQuery {
|
||||
pub rows: Mutex<Vec<crate::ports::WrapUpMovieRow>>,
|
||||
pub rows: Mutex<Vec<crate::models::WrapUpMovieRow>>,
|
||||
}
|
||||
|
||||
impl InMemoryWrapUpStatsQuery {
|
||||
@@ -33,7 +33,7 @@ impl InMemoryWrapUpStatsQuery {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn with_rows(rows: Vec<crate::ports::WrapUpMovieRow>) -> Arc<Self> {
|
||||
pub fn with_rows(rows: Vec<crate::models::WrapUpMovieRow>) -> Arc<Self> {
|
||||
Arc::new(Self {
|
||||
rows: Mutex::new(rows),
|
||||
})
|
||||
@@ -46,7 +46,7 @@ impl crate::ports::WrapUpStatsQuery for InMemoryWrapUpStatsQuery {
|
||||
&self,
|
||||
scope: &crate::models::wrapup::WrapUpScope,
|
||||
range: &crate::models::wrapup::DateRange,
|
||||
) -> Result<Vec<crate::ports::WrapUpMovieRow>, DomainError> {
|
||||
) -> Result<Vec<crate::models::WrapUpMovieRow>, DomainError> {
|
||||
let rows = self.rows.lock().unwrap();
|
||||
let filtered: Vec<_> = rows
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user