feat: add fnOS packaging, storage workflows and release pipeline
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
using dy.net.model.entity;
|
||||
|
||||
namespace dy.net.model.dto
|
||||
{
|
||||
public enum StorageMigrationTaskStatus
|
||||
{
|
||||
Queued = 0,
|
||||
Running = 1,
|
||||
Paused = 2,
|
||||
Completed = 3,
|
||||
PartiallyFailed = 4,
|
||||
Cancelled = 5,
|
||||
Cleaning = 6,
|
||||
Cleaned = 7,
|
||||
RolledBack = 8
|
||||
}
|
||||
|
||||
public enum StorageMigrationItemStage
|
||||
{
|
||||
Pending = 0,
|
||||
Uploading = 1,
|
||||
Verifying = 2,
|
||||
Committing = 3,
|
||||
Succeeded = 4,
|
||||
SucceededWithWarnings = 5,
|
||||
Failed = 6,
|
||||
Cleaned = 7,
|
||||
RolledBack = 8,
|
||||
RecordRemoved = 9
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationPreflightRequest
|
||||
{
|
||||
public bool VerifyCapabilities { get; set; } = true;
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationPreflightResult
|
||||
{
|
||||
public bool CanStart { get; set; }
|
||||
public string ConfigurationFingerprint { get; set; }
|
||||
public int RecordCount { get; set; }
|
||||
public int LocalRecordCount { get; set; }
|
||||
public int LegacyWebDavRecordCount { get; set; }
|
||||
public int AdoptableCount { get; set; }
|
||||
public int TransferRequiredCount { get; set; }
|
||||
public int ReadableFileCount { get; set; }
|
||||
public int MissingFileCount { get; set; }
|
||||
public long TotalBytes { get; set; }
|
||||
public int InvalidCookieCount { get; set; }
|
||||
public int MissingTargetPathCount { get; set; }
|
||||
public int ConflictCount { get; set; }
|
||||
public string Capacity { get; set; } = "unknown";
|
||||
public List<string> Errors { get; set; } = new();
|
||||
public List<string> Warnings { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class CreateStorageMigrationRequest
|
||||
{
|
||||
public int Concurrency { get; set; } = 1;
|
||||
public string ConfigurationFingerprint { get; set; }
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationItemPageRequest
|
||||
{
|
||||
public int PageIndex { get; set; } = 1;
|
||||
public int PageSize { get; set; } = 20;
|
||||
public StorageMigrationItemStage? Stage { get; set; }
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationTaskDetail
|
||||
{
|
||||
public StorageMigrationTask Task { get; set; }
|
||||
public string StatusText { get; set; }
|
||||
public string CurrentFile { get; set; }
|
||||
public bool CanPause { get; set; }
|
||||
public bool CanResume { get; set; }
|
||||
public bool CanCancel { get; set; }
|
||||
public bool CanRetryFailed { get; set; }
|
||||
public bool CanCleanup { get; set; }
|
||||
public bool CanRollback { get; set; }
|
||||
public bool CanArchive { get; set; }
|
||||
}
|
||||
|
||||
public sealed class StorageRecordInventory
|
||||
{
|
||||
public StorageType CurrentStorageType { get; set; }
|
||||
public int TotalRecordCount { get; set; }
|
||||
public int LocalRecordCount { get; set; }
|
||||
public int WebDavRecordCount { get; set; }
|
||||
public int OpenListRecordCount { get; set; }
|
||||
public int CurrentStorageRecordCount { get; set; }
|
||||
public int OtherStorageRecordCount { get; set; }
|
||||
public long LocalDeclaredBytes { get; set; }
|
||||
public long WebDavDeclaredBytes { get; set; }
|
||||
public long OpenListDeclaredBytes { get; set; }
|
||||
public bool AllRecordsOnCurrentStorage => TotalRecordCount == CurrentStorageRecordCount;
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationArchiveResult
|
||||
{
|
||||
public int ArchivedCount { get; set; }
|
||||
public int RequiresCleanupCount { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
|
||||
public sealed class StorageMigrationItemPage
|
||||
{
|
||||
public int TotalCount { get; set; }
|
||||
public List<StorageMigrationItem> Items { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class FailedMigrationRecordPreview
|
||||
{
|
||||
public bool CanExecute { get; set; }
|
||||
public int ActiveMigrationCount { get; set; }
|
||||
public int FailedItemCount { get; set; }
|
||||
public int DistinctVideoCount { get; set; }
|
||||
public int EligibleRecordCount { get; set; }
|
||||
public int AlreadyMissingCount { get; set; }
|
||||
public int ChangedRecordCount { get; set; }
|
||||
public int PermanentlyExcludedCount { get; set; }
|
||||
public int InvalidSnapshotCount { get; set; }
|
||||
public string ConfirmationToken { get; set; }
|
||||
public List<string> Errors { get; set; } = new();
|
||||
public List<string> Warnings { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class RemoveFailedMigrationRecordsRequest
|
||||
{
|
||||
public string ConfirmationToken { get; set; }
|
||||
}
|
||||
|
||||
public sealed class RemoveFailedMigrationRecordsResult
|
||||
{
|
||||
public int DeletedRecordCount { get; set; }
|
||||
public int AlreadyMissingCount { get; set; }
|
||||
public int RemovedItemCount { get; set; }
|
||||
public int AffectedTaskCount { get; set; }
|
||||
public int SkippedChangedCount { get; set; }
|
||||
public int SkippedExcludedCount { get; set; }
|
||||
public int InvalidSnapshotCount { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user