structural refactor and codebase improvements

This commit is contained in:
2026-08-09 14:58:14 +02:00
parent 22b1dd3f56
commit c9715baab8
247 changed files with 11515 additions and 3063 deletions

View File

@@ -0,0 +1,46 @@
[package]
name = "composition"
version = "0.1.0"
edition = "2024"
[features]
default = []
sqlite = ["dep:sqlite", "dep:sqlite-event-queue", "dep:sqlite-search", "dep:sqlite-social", "infra-wiring/sqlite"]
postgres = ["dep:postgres", "dep:postgres-event-queue", "dep:postgres-search", "dep:postgres-social", "infra-wiring/postgres"]
nats = ["dep:nats", "infra-wiring/nats"]
federation = ["application/federation"]
sqlite-federation = ["sqlite", "dep:sqlite-federation", "dep:activitypub", "federation"]
postgres-federation = ["postgres", "dep:postgres-federation", "dep:activitypub", "federation"]
[dependencies]
domain = { workspace = true }
application = { workspace = true }
infra-wiring = { workspace = true }
auth = { workspace = true }
metadata = { workspace = true }
poster-fetcher = { workspace = true }
object-storage = { workspace = true }
jellyfin = { workspace = true }
plex = { workspace = true }
anyhow = { workspace = true }
sqlite = { workspace = true, optional = true }
postgres = { workspace = true, optional = true }
sqlite-event-queue = { workspace = true, optional = true }
postgres-event-queue = { workspace = true, optional = true }
sqlite-search = { workspace = true, optional = true }
postgres-search = { workspace = true, optional = true }
sqlite-social = { workspace = true, optional = true }
postgres-social = { workspace = true, optional = true }
nats = { workspace = true, optional = true }
activitypub = { workspace = true, optional = true }
sqlite-federation = { workspace = true, optional = true }
postgres-federation = { workspace = true, optional = true }
[dev-dependencies]
async-trait = { workspace = true }
chrono = { workspace = true }
domain = { workspace = true, features = ["test-helpers"] }
sqlx = { workspace = true }
tokio = { workspace = true }
uuid = { workspace = true }

View File

@@ -0,0 +1,391 @@
use application::auth::deps::{
LoginDeps, LogoutDeps, RefreshDeps, RegisterAndLoginDeps, RegisterDeps,
};
use application::deps::{
AuthGroup, Deps, DiaryGroup, GoalsGroup, ImportGroup, IntegrationsGroup, MoviesGroup,
PersonGroup, SearchGroup, SocialGroup, UsersGroup, WatchlistGroup, WorkerDeps, WrapupGroup,
};
use application::diary::deps::{
DeleteReviewDeps, EditReviewDeps, ExportDiaryDeps, GetActivityFeedDeps, GetDiaryDeps,
GetMovieSocialPageDeps, GetReviewHistoryDeps, GetUserFeedDeps,
};
use application::goals::deps::{GoalCommandDeps, GoalQueryDeps};
use application::import::deps::{
ApplyMappingDeps, ApplyProfileAndMapDeps, ApplyProfileDeps, CreateSessionDeps,
DeleteImportProfileDeps, ExecuteImportDeps, GetMappingStageDeps, GetPreviewStageDeps,
GetSessionStateDeps, ListImportProfilesDeps, SaveProfileDeps,
};
use application::integrations::deps::{
ConfirmWatchEventsDeps, DismissWatchEventsDeps, GenerateWebhookTokenDeps, GetWatchQueueDeps,
GetWebhookTokensDeps, IngestWatchEventDeps, RevokeWebhookTokenDeps,
};
use application::movies::deps::{
EnrichMovieDeps, GetMovieProfileDeps, GetMoviesDeps, ReindexSearchDeps, SyncPosterDeps,
};
use application::movies::merge_duplicates::MergeDuplicatesDeps;
use application::person::deps::{EnrichPersonDeps, GetPersonDeps};
use application::search::deps::SearchDeps;
use application::social::deps::{SocialCommandDeps, SocialQueryDeps};
use application::users::deps::{
AuthorizeAdminDeps, DeleteAccountDeps, GetCurrentProfileDeps, GetFederatedProfileDeps,
GetFederatedProfileStatsDeps, GetLocalProfileDeps, GetPageViewerDeps, GetProfileSettingsDeps,
GetSettingsDeps, GetUsersListDeps, ResolveUsernameDeps, UpdateProfileDeps,
UpdateProfileFieldsDeps, UpdateSettingsDeps,
};
use application::watchlist::deps::{
GetWatchlistDeps, GetWatchlistForOwnerDeps, IsOnWatchlistDeps, RemoveFromWatchlistDeps,
WatchlistAddDeps,
};
use application::wrapup::deps::{
DeleteWrapUpDeps, GenerateWrapUpDeps, GetReadyReportDeps, GetWrapUpDeps,
HandleWrapUpRequestedDeps, ListWrapUpsDeps,
};
use domain::value_objects::InstanceIdentity;
use crate::{DatabaseOutput, Repositories};
/// The composition root's single assembly point: every one of the server-facing
/// deps structs, built once from the already-constructed `Repositories` and
/// `application::Services`. Only `Arc` clones happen here — no adapters are built.
pub fn build_deps(
repos: &Repositories,
services: &application::Services,
config: &application::config::AppConfig,
instance: &InstanceIdentity,
) -> Deps {
Deps {
auth: AuthGroup {
login: LoginDeps {
user: repos.user.clone(),
password_hasher: services.password_hasher.clone(),
auth: services.auth.clone(),
refresh_session: repos.refresh_session.clone(),
config: config.clone(),
},
register: RegisterDeps {
user: repos.user.clone(),
password_hasher: services.password_hasher.clone(),
config: config.clone(),
},
refresh: RefreshDeps {
refresh_session: repos.refresh_session.clone(),
auth: services.auth.clone(),
config: config.clone(),
},
register_and_login: RegisterAndLoginDeps {
user: repos.user.clone(),
password_hasher: services.password_hasher.clone(),
auth: services.auth.clone(),
refresh_session: repos.refresh_session.clone(),
config: config.clone(),
},
logout: LogoutDeps {
refresh_session: repos.refresh_session.clone(),
},
},
diary: DiaryGroup {
delete_review: DeleteReviewDeps {
review: repos.review.clone(),
diary: repos.diary.clone(),
movie_command: repos.movie_command.clone(),
event_publisher: services.event_publisher.clone(),
},
edit_review: EditReviewDeps {
review: repos.review.clone(),
event_publisher: services.event_publisher.clone(),
},
get_movie_social_page: GetMovieSocialPageDeps {
movie_query: repos.movie_query.clone(),
diary: repos.diary.clone(),
movie_profile: repos.movie_profile.clone(),
},
get_activity_feed: GetActivityFeedDeps {
diary: repos.diary.clone(),
social_query: repos.follow_graph.clone(),
config: config.clone(),
},
get_user_feed: GetUserFeedDeps {
user: repos.user.clone(),
diary: repos.diary.clone(),
},
get_diary: GetDiaryDeps {
diary: repos.diary.clone(),
},
get_review_history: GetReviewHistoryDeps {
diary: repos.diary.clone(),
},
export_diary: ExportDiaryDeps {
diary: repos.diary.clone(),
diary_exporter: services.diary_exporter.clone(),
},
},
goals: GoalsGroup {
command: GoalCommandDeps {
goal_command: repos.goal_command.clone(),
goal_query: repos.goal_query.clone(),
stats: repos.stats.clone(),
event_publisher: services.event_publisher.clone(),
},
query: GoalQueryDeps {
goal_query: repos.goal_query.clone(),
stats: repos.stats.clone(),
},
},
import: ImportGroup {
create_session: CreateSessionDeps {
import_session: repos.import_session.clone(),
document_parser: services.document_parser.clone(),
},
apply_mapping: ApplyMappingDeps {
import_session: repos.import_session.clone(),
document_parser: services.document_parser.clone(),
movie_query: repos.movie_query.clone(),
},
apply_profile: ApplyProfileDeps {
import_profile: repos.import_profile.clone(),
import_session: repos.import_session.clone(),
},
execute_import: ExecuteImportDeps {
import_session: repos.import_session.clone(),
review_logger: services.review_logger.clone(),
},
save_profile: SaveProfileDeps {
import_session: repos.import_session.clone(),
import_profile: repos.import_profile.clone(),
},
get_mapping_stage: GetMappingStageDeps {
import_session: repos.import_session.clone(),
},
get_preview_stage: GetPreviewStageDeps {
import_session: repos.import_session.clone(),
},
get_session_state: GetSessionStateDeps {
import_session: repos.import_session.clone(),
},
apply_profile_and_map: ApplyProfileAndMapDeps {
import_profile: repos.import_profile.clone(),
import_session: repos.import_session.clone(),
document_parser: services.document_parser.clone(),
movie_query: repos.movie_query.clone(),
},
delete_profile: DeleteImportProfileDeps {
import_profile: repos.import_profile.clone(),
},
list_profiles: ListImportProfilesDeps {
import_profile: repos.import_profile.clone(),
},
},
integrations: IntegrationsGroup {
ingest_watch_event: IngestWatchEventDeps {
webhook_token: repos.webhook_token.clone(),
watch_event_command: repos.watch_event_command.clone(),
watch_event_query: repos.watch_event_query.clone(),
event_publisher: services.event_publisher.clone(),
},
confirm_watch_events: ConfirmWatchEventsDeps {
watch_event_command: repos.watch_event_command.clone(),
watch_event_query: repos.watch_event_query.clone(),
review_logger: services.review_logger.clone(),
},
dismiss_watch_events: DismissWatchEventsDeps {
watch_event_command: repos.watch_event_command.clone(),
watch_event_query: repos.watch_event_query.clone(),
},
generate_webhook_token: GenerateWebhookTokenDeps {
webhook_token: repos.webhook_token.clone(),
},
get_watch_queue: GetWatchQueueDeps {
watch_event_query: repos.watch_event_query.clone(),
},
get_webhook_tokens: GetWebhookTokensDeps {
webhook_token: repos.webhook_token.clone(),
},
revoke_webhook_token: RevokeWebhookTokenDeps {
webhook_token: repos.webhook_token.clone(),
},
jellyfin_parser: std::sync::Arc::new(jellyfin::JellyfinParser),
plex_parser: std::sync::Arc::new(plex::PlexParser),
},
movies: MoviesGroup {
sync_poster: SyncPosterDeps {
movie_command: repos.movie_command.clone(),
movie_query: repos.movie_query.clone(),
movie_profile: repos.movie_profile.clone(),
metadata: services.metadata.clone(),
poster_fetcher: services.poster_fetcher.clone(),
object_storage: services.object_storage.clone(),
event_publisher: services.event_publisher.clone(),
search_command: repos.search_command.clone(),
},
get_movie_profile: GetMovieProfileDeps {
movie_profile: repos.movie_profile.clone(),
},
get_movies: GetMoviesDeps {
movie: repos.movie_query.clone(),
},
},
person: PersonGroup {
get_person: GetPersonDeps {
person_query: repos.person_query.clone(),
event_publisher: services.event_publisher.clone(),
},
},
search: SearchGroup {
execute: SearchDeps {
search_port: repos.search_port.clone(),
},
},
social: SocialGroup {
command: SocialCommandDeps {
social_command: repos.social_command.clone(),
event_publisher: services.event_publisher.clone(),
},
query: SocialQueryDeps {
follow_graph: repos.follow_graph.clone(),
block_query: repos.block_query.clone(),
},
},
users: UsersGroup {
get_local_profile: GetLocalProfileDeps {
stats: repos.stats.clone(),
diary: repos.diary.clone(),
social_query: repos.follow_graph.clone(),
user: repos.user.clone(),
instance: instance.clone(),
},
get_federated_profile_stats: GetFederatedProfileStatsDeps {
stats: repos.stats.clone(),
diary: repos.diary.clone(),
social_query: repos.follow_graph.clone(),
},
get_page_viewer: GetPageViewerDeps {
user: repos.user.clone(),
follow_graph: repos.follow_graph.clone(),
},
resolve_username: ResolveUsernameDeps {
user: repos.user.clone(),
},
get_profile_settings: GetProfileSettingsDeps {
user: repos.user.clone(),
profile_fields: repos.profile_fields.clone(),
instance: instance.clone(),
},
get_users_list: GetUsersListDeps {
user: repos.user.clone(),
federation_admin: repos.federation_admin.clone(),
},
update_profile: UpdateProfileDeps {
user: repos.user.clone(),
object_storage: services.object_storage.clone(),
event_publisher: services.event_publisher.clone(),
},
delete_account: DeleteAccountDeps {
user: repos.user.clone(),
event_publisher: services.event_publisher.clone(),
},
get_current_profile: GetCurrentProfileDeps {
user: repos.user.clone(),
},
update_profile_fields: UpdateProfileFieldsDeps {
profile_fields: repos.profile_fields.clone(),
event_publisher: services.event_publisher.clone(),
},
get_settings: GetSettingsDeps {
user_settings: repos.user_settings.clone(),
},
update_settings: UpdateSettingsDeps {
user_settings: repos.user_settings.clone(),
},
authorize_admin: AuthorizeAdminDeps {
user: repos.user.clone(),
},
get_federated_profile: GetFederatedProfileDeps {
federated_profile: repos.federated_profile.clone(),
},
},
watchlist: WatchlistGroup {
add: WatchlistAddDeps {
movie_command: repos.movie_command.clone(),
movie_query: repos.movie_query.clone(),
metadata: services.metadata.clone(),
watchlist: repos.watchlist.clone(),
event_publisher: services.event_publisher.clone(),
},
get_watchlist_for_owner: GetWatchlistForOwnerDeps {
user: repos.user.clone(),
watchlist: repos.watchlist.clone(),
remote_watchlist: repos.remote_watchlist.clone(),
},
get_watchlist: GetWatchlistDeps {
watchlist: repos.watchlist.clone(),
},
is_on_watchlist: IsOnWatchlistDeps {
watchlist: repos.watchlist.clone(),
},
remove_from_watchlist: RemoveFromWatchlistDeps {
watchlist: repos.watchlist.clone(),
event_publisher: services.event_publisher.clone(),
},
},
wrapup: WrapupGroup {
get_ready_report: GetReadyReportDeps {
wrapup_repo: repos.wrapup_repo.clone(),
},
delete_wrapup: DeleteWrapUpDeps {
wrapup_repo: repos.wrapup_repo.clone(),
},
generate: GenerateWrapUpDeps {
wrapup_repo: repos.wrapup_repo.clone(),
event_publisher: services.event_publisher.clone(),
},
get_wrapup: GetWrapUpDeps {
wrapup_repo: repos.wrapup_repo.clone(),
},
list_wrapups: ListWrapUpsDeps {
wrapup_repo: repos.wrapup_repo.clone(),
},
},
}
}
/// The worker binary's assembly point: the five deps structs that have no consumer
/// the server binary can ever reach, built straight from `DatabaseOutput` — the
/// worker cannot honestly construct a `Repositories` (it lacks the six
/// federation-sourced ports) but every field this function reads is on
/// `DatabaseOutput` — plus `application::WorkerServices`, the strict subset of
/// ports the worker actually constructs.
pub fn build_worker_deps(
db: &DatabaseOutput,
services: &application::WorkerServices,
) -> WorkerDeps {
WorkerDeps {
enrich_movie: EnrichMovieDeps {
movie_query: db.movie_query.clone(),
movie_profile: db.movie_profile.clone(),
person_command: db.person_command.clone(),
search_command: db.search_command.clone(),
},
reindex_search: ReindexSearchDeps {
movie_query: db.movie_query.clone(),
movie_profile: db.movie_profile.clone(),
search_command: db.search_command.clone(),
person_command: db.person_command.clone(),
person_query: db.person_query.clone(),
},
merge_duplicates: MergeDuplicatesDeps {
movie_query: db.movie_query.clone(),
deduplicator: db.deduplicator.clone(),
object_storage: services.object_storage.clone(),
},
enrich_person: EnrichPersonDeps {
person_query: db.person_query.clone(),
person_enrichment: services.person_enrichment.clone(),
person_command: db.person_command.clone(),
},
handle_requested: HandleWrapUpRequestedDeps {
wrapup_repo: db.wrapup_repo.clone(),
event_publisher: services.event_publisher.clone(),
wrapup_stats: db.wrapup_stats.clone(),
},
}
}

View File

@@ -0,0 +1,197 @@
use std::sync::Arc;
use anyhow::Context;
use domain::ports::{
AuthService, ImageRefCommand, ImageRefQuery, LocalApContentQuery, MetadataClient,
MovieDeduplicator, ObjectStorage, PasswordHasher, PosterFetcherClient,
RefreshSessionRepository, UserProfileFieldsRepository, WatchEventCommand, WatchEventQuery,
WebhookTokenRepository,
};
pub use infra_wiring::DbPool;
pub struct DatabaseOutput {
pub movie_command: Arc<dyn domain::ports::MovieCommand>,
pub movie_query: Arc<dyn domain::ports::MovieQuery>,
pub review: Arc<dyn domain::ports::ReviewRepository>,
pub diary: Arc<dyn domain::ports::DiaryQuery>,
pub stats: Arc<dyn domain::ports::StatsRepository>,
pub user: Arc<dyn domain::ports::UserRepository>,
pub import_session: Arc<dyn domain::ports::ImportSessionRepository>,
pub import_profile: Arc<dyn domain::ports::ImportProfileRepository>,
pub movie_profile: Arc<dyn domain::ports::MovieProfileRepository>,
pub watchlist: Arc<dyn domain::ports::WatchlistRepository>,
pub watch_event_command: Arc<dyn WatchEventCommand>,
pub watch_event_query: Arc<dyn WatchEventQuery>,
pub webhook_token: Arc<dyn WebhookTokenRepository>,
pub person_command: Arc<dyn domain::ports::PersonCommand>,
pub person_query: Arc<dyn domain::ports::PersonQuery>,
pub search_port: Arc<dyn domain::ports::SearchPort>,
pub search_command: Arc<dyn domain::ports::SearchCommand>,
pub profile_fields: Arc<dyn UserProfileFieldsRepository>,
pub ap_content: Arc<dyn LocalApContentQuery>,
pub wrapup_stats: Arc<dyn domain::ports::WrapUpStatsQuery>,
pub wrapup_repo: Arc<dyn domain::ports::WrapUpRepository>,
pub goal_command: Arc<dyn domain::ports::GoalCommand>,
pub goal_query: Arc<dyn domain::ports::GoalQuery>,
pub user_settings: Arc<dyn domain::ports::UserSettingsRepository>,
pub federation_settings: std::sync::Arc<dyn domain::ports::UserFederationSettingsQuery>,
pub remote_goal: Arc<dyn domain::ports::RemoteGoalRepository>,
pub refresh_session: Arc<dyn RefreshSessionRepository>,
pub deduplicator: Arc<dyn MovieDeduplicator>,
pub image_ref_command: Arc<dyn ImageRefCommand>,
pub image_ref_query: Arc<dyn ImageRefQuery>,
pub follow_command: Arc<dyn domain::ports::FollowCommand>,
pub follow_query: Arc<dyn domain::ports::FollowQuery>,
pub db_pool: DbPool,
}
pub async fn build_database_adapters(
backend: &str,
url: &str,
instance: &domain::value_objects::InstanceIdentity,
) -> anyhow::Result<DatabaseOutput> {
match backend {
#[cfg(feature = "postgres")]
"postgres" => {
let w = postgres::wire(url)
.await
.context("PostgreSQL connection failed")?;
let (image_ref_command, image_ref_query) = postgres::create_image_ref(w.pool.clone());
let (pc, pq) = postgres::create_person_adapter(w.pool.clone());
let (sc, sp) = postgres_search::create_search_adapter(w.pool.clone());
let pf = postgres::create_profile_fields_repo(w.pool.clone());
let we = Arc::new(postgres::PostgresWatchEventRepository::new(w.pool.clone()));
let wt: Arc<dyn WebhookTokenRepository> = Arc::new(
postgres::PostgresWebhookTokenRepository::new(w.pool.clone()),
);
let social = Arc::new(postgres_social::PostgresSocialRepository::new(
w.pool.clone(),
instance.clone(),
));
Ok(DatabaseOutput {
movie_command: w.movie_command,
movie_query: w.movie_query,
review: w.review,
diary: w.diary,
stats: w.stats,
user: w.user,
import_session: w.import_session,
import_profile: w.import_profile,
movie_profile: w.movie_profile,
watchlist: w.watchlist,
watch_event_command: we.clone() as _,
watch_event_query: we as _,
webhook_token: wt,
person_command: pc,
person_query: pq,
search_port: sp,
search_command: sc,
profile_fields: pf,
ap_content: w.ap_content,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
goal_command: w.goal_command,
goal_query: w.goal_query,
user_settings: w.user_settings,
federation_settings: w.federation_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(postgres::PostgresRefreshSessionAdapter::new(
w.pool.clone(),
)) as _,
deduplicator: w.deduplicator,
image_ref_command,
image_ref_query,
follow_command: Arc::clone(&social) as _,
follow_query: social as _,
db_pool: DbPool::Postgres(w.pool),
})
}
#[cfg(feature = "sqlite")]
_ => {
let w = sqlite::wire(url)
.await
.context("SQLite connection failed")?;
let (image_ref_command, image_ref_query) = sqlite::create_image_ref(w.pool.clone());
let (pc, pq) = sqlite::create_person_adapter(w.pool.clone());
let (sc, sp) = sqlite_search::create_search_adapter(w.pool.clone());
let pf = sqlite::create_profile_fields_repo(w.pool.clone());
let we = Arc::new(sqlite::SqliteWatchEventRepository::new(w.pool.clone()));
let wt: Arc<dyn WebhookTokenRepository> =
Arc::new(sqlite::SqliteWebhookTokenRepository::new(w.pool.clone()));
let social = Arc::new(sqlite_social::SqliteSocialRepository::new(
w.pool.clone(),
instance.clone(),
));
Ok(DatabaseOutput {
movie_command: w.movie_command,
movie_query: w.movie_query,
review: w.review,
diary: w.diary,
stats: w.stats,
user: w.user,
import_session: w.import_session,
import_profile: w.import_profile,
movie_profile: w.movie_profile,
watchlist: w.watchlist,
watch_event_command: we.clone() as _,
watch_event_query: we as _,
webhook_token: wt,
person_command: pc,
person_query: pq,
search_port: sp,
search_command: sc,
profile_fields: pf,
ap_content: w.ap_content,
wrapup_stats: w.wrapup_stats,
wrapup_repo: w.wrapup_repo,
goal_command: w.goal_command,
goal_query: w.goal_query,
user_settings: w.user_settings,
federation_settings: w.federation_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(sqlite::SqliteRefreshSessionAdapter::new(w.pool.clone()))
as _,
deduplicator: w.deduplicator,
image_ref_command,
image_ref_query,
follow_command: Arc::clone(&social) as _,
follow_query: social as _,
db_pool: DbPool::Sqlite(w.pool),
})
}
#[cfg(not(feature = "sqlite"))]
_ => anyhow::bail!(
"DATABASE_BACKEND={backend} is not supported by this build (enable sqlite or postgres feature)"
),
}
}
pub fn build_auth_adapters() -> anyhow::Result<(Arc<dyn AuthService>, Arc<dyn PasswordHasher>)> {
auth::create()
}
pub fn build_metadata_client() -> anyhow::Result<Arc<dyn MetadataClient>> {
metadata::create()
}
pub fn build_poster_fetcher() -> anyhow::Result<Arc<dyn PosterFetcherClient>> {
poster_fetcher::create()
}
pub fn build_object_storage() -> anyhow::Result<Arc<dyn ObjectStorage>> {
object_storage::create()
}
pub fn build_profile_fields_repo(
pool: &DbPool,
) -> anyhow::Result<Arc<dyn UserProfileFieldsRepository>> {
match pool {
#[cfg(feature = "postgres")]
DbPool::Postgres(pool) => Ok(postgres::create_profile_fields_repo(pool.clone())),
#[cfg(feature = "sqlite")]
DbPool::Sqlite(pool) => Ok(sqlite::create_profile_fields_repo(pool.clone())),
#[cfg(not(feature = "sqlite"))]
_ => anyhow::bail!("no profile fields repo for this backend"),
}
}

View File

@@ -0,0 +1,11 @@
pub mod build;
pub mod factory;
pub mod repositories;
pub use build::{build_deps, build_worker_deps};
pub use factory::{DatabaseOutput, DbPool};
pub use repositories::Repositories;
#[cfg(test)]
#[path = "tests/build.rs"]
mod build_tests;

View File

@@ -0,0 +1,46 @@
use std::sync::Arc;
use domain::ports::{
BlockQuery, DiaryQuery, FederatedProfileQuery, FederationAdminQuery, FollowGraphQuery,
GoalCommand, GoalQuery, ImportProfileRepository, ImportSessionRepository, MovieCommand,
MovieProfileRepository, MovieQuery, PersonCommand, PersonQuery, RefreshSessionRepository,
RemoteGoalRepository, RemoteWatchlistRepository, ReviewRepository, SearchCommand, SearchPort,
SocialCommand, StatsRepository, UserProfileFieldsRepository, UserRepository,
UserSettingsRepository, WatchEventCommand, WatchEventQuery, WatchlistRepository,
WebhookTokenRepository, WrapUpRepository, WrapUpStatsQuery,
};
#[derive(Clone)]
pub struct Repositories {
pub movie_command: Arc<dyn MovieCommand>,
pub movie_query: Arc<dyn MovieQuery>,
pub review: Arc<dyn ReviewRepository>,
pub diary: Arc<dyn DiaryQuery>,
pub stats: Arc<dyn StatsRepository>,
pub user: Arc<dyn UserRepository>,
pub import_session: Arc<dyn ImportSessionRepository>,
pub import_profile: Arc<dyn ImportProfileRepository>,
pub movie_profile: Arc<dyn MovieProfileRepository>,
pub watchlist: Arc<dyn WatchlistRepository>,
pub watch_event_command: Arc<dyn WatchEventCommand>,
pub watch_event_query: Arc<dyn WatchEventQuery>,
pub webhook_token: Arc<dyn WebhookTokenRepository>,
pub person_command: Arc<dyn PersonCommand>,
pub person_query: Arc<dyn PersonQuery>,
pub search_port: Arc<dyn SearchPort>,
pub search_command: Arc<dyn SearchCommand>,
pub profile_fields: Arc<dyn UserProfileFieldsRepository>,
pub remote_watchlist: Arc<dyn RemoteWatchlistRepository>,
pub social_command: Arc<dyn SocialCommand>,
pub follow_graph: Arc<dyn FollowGraphQuery>,
pub block_query: Arc<dyn BlockQuery>,
pub federation_admin: Arc<dyn FederationAdminQuery>,
pub wrapup_stats: Arc<dyn WrapUpStatsQuery>,
pub wrapup_repo: Arc<dyn WrapUpRepository>,
pub goal_command: Arc<dyn GoalCommand>,
pub goal_query: Arc<dyn GoalQuery>,
pub user_settings: Arc<dyn UserSettingsRepository>,
pub remote_goal: Arc<dyn RemoteGoalRepository>,
pub refresh_session: Arc<dyn RefreshSessionRepository>,
pub federated_profile: Option<Arc<dyn FederatedProfileQuery>>,
}

File diff suppressed because it is too large Load Diff