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,18 @@
//! Transcode settings port.
//!
//! Persists FFmpeg transcoding configuration (cleanup TTL, etc.).
//! Small enough to keep as a single trait.
use async_trait::async_trait;
use crate::errors::DomainResult;
/// Port for transcode settings persistence.
#[async_trait]
pub trait TranscodeSettingsRepository: Send + Sync {
/// Load the persisted cleanup TTL. Returns `None` if no row exists yet.
async fn load_cleanup_ttl(&self) -> DomainResult<Option<u32>>;
/// Persist the cleanup TTL (upsert -- always row id=1).
async fn save_cleanup_ttl(&self, hours: u32) -> DomainResult<()>;
}