domain ports: CQRS-split traits for all bounded contexts

This commit is contained in:
2026-07-12 01:23:38 +02:00
parent 616c60e213
commit 0166e829c1
13 changed files with 693 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
//! Domain ports (trait definitions).
//!
//! These traits define the abstract interfaces that infrastructure adapters
//! implement. The domain layer depends only on these traits, never on concrete
//! implementations.
//!
//! Repository traits follow a CQRS split: separate Command (write) and Query
//! (read) traits for each aggregate. Small or rarely-split repositories keep
//! a single trait when the split adds no value.
pub mod activity;
pub mod auth;
pub mod channel;
pub mod events;
pub mod library;
pub mod media;
pub mod provider_config;
pub mod schedule;
pub mod settings;
pub mod transcode;
pub mod user;
// -- Re-exports for convenience --
pub use activity::{ActivityLogCommand, ActivityLogQuery};
pub use auth::AuthService;
pub use channel::{ChannelCommand, ChannelQuery};
pub use events::{DomainEvent, EventHandler, EventPublisher};
pub use library::{LibraryCommand, LibraryQuery, LibrarySyncAdapter};
pub use media::{
Collection, IMediaProvider, IProviderRegistry, ProviderCapabilities, SeriesSummary,
StreamQuality, StreamingProtocol,
};
pub use provider_config::{ProviderConfigCommand, ProviderConfigQuery};
pub use schedule::{ScheduleCommand, ScheduleQuery};
pub use settings::AppSettingsRepository;
pub use transcode::TranscodeSettingsRepository;
pub use user::{UserCommand, UserQuery};