domain: add RefreshSession model + repository port

This commit is contained in:
2026-06-11 14:29:43 +02:00
parent db285b513b
commit ef9ecbae06
12 changed files with 101 additions and 14 deletions

View File

@@ -41,6 +41,7 @@ pub struct WorkerDbOutput {
pub goal: Arc<dyn domain::ports::GoalRepository>,
pub user_settings: Arc<dyn domain::ports::UserSettingsRepository>,
pub remote_goal: Arc<dyn domain::ports::RemoteGoalRepository>,
pub refresh_session: Arc<dyn domain::ports::RefreshSessionRepository>,
pub db_pool: DbPool,
}
@@ -86,6 +87,7 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
db_pool: DbPool::Postgres(w.pool),
})
}
@@ -128,6 +130,7 @@ pub async fn connect(database_url: &str, backend: &str) -> anyhow::Result<Worker
goal: w.goal,
user_settings: w.user_settings,
remote_goal: w.remote_goal,
refresh_session: Arc::new(domain::testing::PanicRefreshSessionRepository) as _,
db_pool: DbPool::Sqlite(w.pool),
})
}

View File

@@ -108,6 +108,7 @@ async fn main() -> anyhow::Result<()> {
goal: db.goal,
user_settings: db.user_settings,
remote_goal: db.remote_goal,
refresh_session: db.refresh_session,
},
services: Services {
auth: auth_service,