domain ports: CQRS-split traits for all bounded contexts
This commit is contained in:
18
crates/domain/src/ports/transcode.rs
Normal file
18
crates/domain/src/ports/transcode.rs
Normal 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<()>;
|
||||
}
|
||||
Reference in New Issue
Block a user