| | | 1 | | namespace RoleRadar.Application.Abstractions; |
| | | 2 | | |
| | | 3 | | public sealed record BackupArchiveSummaryDto( |
| | | 4 | | string ArchivePath, |
| | | 5 | | long BytesWritten, |
| | | 6 | | DateTime CreatedAtUtc); |
| | | 7 | | |
| | 16 | 8 | | public sealed record RestoreArchiveSummaryDto( |
| | 4 | 9 | | string ArchivePath, |
| | 34 | 10 | | IReadOnlyDictionary<string, long> RestoredCounts, |
| | 16 | 11 | | DateTime CompletedAtUtc); |
| | | 12 | | |
| | | 13 | | public sealed record WipeSummaryDto( |
| | | 14 | | IReadOnlyDictionary<string, long> DroppedCounts, |
| | | 15 | | DateTime CompletedAtUtc); |
| | | 16 | | |
| | | 17 | | public interface IBackupArchiveService |
| | | 18 | | { |
| | | 19 | | Task<Result<BackupArchiveSummaryDto>> CreateBackupAsync( |
| | | 20 | | string targetFilePath, |
| | | 21 | | string passphrase, |
| | | 22 | | CancellationToken cancellationToken = default); |
| | | 23 | | |
| | | 24 | | Task<Result<RestoreArchiveSummaryDto>> RestoreBackupAsync( |
| | | 25 | | string backupFilePath, |
| | | 26 | | string passphrase, |
| | | 27 | | bool forceOverwrite = false, |
| | | 28 | | CancellationToken cancellationToken = default); |
| | | 29 | | |
| | | 30 | | Task<Result<WipeSummaryDto>> WipeDatabaseAsync( |
| | | 31 | | string confirmation, |
| | | 32 | | CancellationToken cancellationToken = default); |
| | | 33 | | } |