Add the restore command.

This commit is contained in:
2025-01-17 20:49:28 +02:00
parent 87682a056f
commit b32e5d32b0
6 changed files with 88 additions and 1 deletions
@@ -8,8 +8,11 @@ from tui_rsync.core.components.backup_plan.application.services.backup_plan_serv
from tui_rsync.core.ports.configuration import UserDataPathsPort
from tui_rsync.core.ports.orm import DatabaseManagerPort
from tui_rsync.core.shared_kernel.components.backup.application.service import BackupSyncService
from tui_rsync.core.shared_kernel.components.backup.application.service.backup_restore_service import \
BackupRestoreService
from tui_rsync.infrastructure.configuration import UserDataPaths
from tui_rsync.infrastructure.orm import SqliteDatabaseManager
from tui_rsync.user_interface.cli.shared_kernel.components.prompts.applications.prompts import ChoosePromptFzf
class Configuration(Module):
@@ -47,3 +50,13 @@ class Configuration(Module):
@singleton
def provide_backup_sync_service(self, backup_plan_repository: BackupPlanRepositoryPort) -> BackupSyncService:
return BackupSyncService(backup_plan_repository)
@provider
@singleton
def provide_backup_restore_service(self, backup_plan_repository: BackupPlanRepositoryPort) -> BackupRestoreService:
return BackupRestoreService(backup_plan_repository)
@provider
@singleton
def provide_choose_prompt_fzf(self) -> ChoosePromptFzf:
return ChoosePromptFzf()