|
|
@ -1,9 +1,10 @@
|
|
|
|
from injector import singleton, Module, provider
|
|
|
|
from injector import singleton, Module, provider
|
|
|
|
|
|
|
|
|
|
|
|
from tui_rsync.core.components.backup_plan.application.commands import RemoveAllBackupBackupPlansCommand
|
|
|
|
from tui_rsync.core.components.backup_plan.application.commands import RemoveAllBackupBackupPlansCommand
|
|
|
|
from tui_rsync.core.components.backup_plan.application.queries import GetAllBackupBackupPlansQuery
|
|
|
|
from tui_rsync.core.components.backup_plan.application.queries import GetAllBackupPlansQuery, GetBackupPlanCountQuery
|
|
|
|
from tui_rsync.core.components.backup_plan.application.repository import BackupPlanRepositoryPort
|
|
|
|
from tui_rsync.core.components.backup_plan.application.repository import BackupPlanRepositoryPort, BackupPlanRepository
|
|
|
|
from tui_rsync.core.components.backup_plan.application.repository.backup_plan_repository import BackupPlanRepository
|
|
|
|
from tui_rsync.core.components.backup_plan.application.services import GetBackupPlanCountService, \
|
|
|
|
|
|
|
|
GetAllBackupPlansService
|
|
|
|
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
|
|
|
|
from tui_rsync.core.components.backup_plan.application.services.backup_plan_service import BackupPlanService
|
|
|
|
from tui_rsync.core.ports.configuration import UserDataPathsPort
|
|
|
|
from tui_rsync.core.ports.configuration import UserDataPathsPort
|
|
|
|
from tui_rsync.core.ports.orm import DatabaseManagerPort
|
|
|
|
from tui_rsync.core.ports.orm import DatabaseManagerPort
|
|
|
@ -38,13 +39,28 @@ class TestingConfiguration(Module):
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
@provider
|
|
|
|
@singleton
|
|
|
|
@singleton
|
|
|
|
def provide_remove_all_backup_backup_plans_command(self, database_manager: DatabaseManagerPort) -> RemoveAllBackupBackupPlansCommand:
|
|
|
|
def provide_remove_all_backup_plans_command(self, database_manager: DatabaseManagerPort) -> RemoveAllBackupBackupPlansCommand:
|
|
|
|
return RemoveAllBackupBackupPlansCommand(database_manager)
|
|
|
|
return RemoveAllBackupBackupPlansCommand(database_manager)
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
@provider
|
|
|
|
@singleton
|
|
|
|
@singleton
|
|
|
|
def provide_get_all_backup_backup_plans_query(self, database_manager: DatabaseManagerPort) -> GetAllBackupBackupPlansQuery:
|
|
|
|
def provide_get_all_backup_plans_query(self, database_manager: DatabaseManagerPort) -> GetAllBackupPlansQuery:
|
|
|
|
return GetAllBackupBackupPlansQuery(database_manager)
|
|
|
|
return GetAllBackupPlansQuery(database_manager)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
|
|
|
|
@singleton
|
|
|
|
|
|
|
|
def provide_get_backup_plan_count_query(self, database_manager: DatabaseManagerPort) -> GetBackupPlanCountQuery:
|
|
|
|
|
|
|
|
return GetBackupPlanCountQuery(database_manager)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
|
|
|
|
@singleton
|
|
|
|
|
|
|
|
def provide_get_backup_plan_count_service(self, query: GetBackupPlanCountQuery) -> GetBackupPlanCountService:
|
|
|
|
|
|
|
|
return GetBackupPlanCountService(query)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
|
|
|
|
@singleton
|
|
|
|
|
|
|
|
def provide_get_all_backup_plans_service(self, query: GetAllBackupPlansQuery) -> GetAllBackupPlansService:
|
|
|
|
|
|
|
|
return GetAllBackupPlansService(query)
|
|
|
|
|
|
|
|
|
|
|
|
@provider
|
|
|
|
@provider
|
|
|
|
@singleton
|
|
|
|
@singleton
|
|
|
|