Files
decort-golang-sdk/pkg/cloudbroker/backup/models.go

82 lines
1.8 KiB
Go
Raw Normal View History

2023-05-15 19:27:02 +03:00
package backup
// Main info about backup
type InfoBackup struct {
// Compute ID
ComputeID uint64 `json:"computeId"`
// Disk ID
DiskID uint64 `json:"diskId"`
// Backup path
BackupPath string `json:"backupPath"`
2023-05-18 13:55:28 +03:00
// Possible error
Error string `json:"error"`
2023-05-15 19:27:02 +03:00
}
// CreateDisksBackup response
type ListInfoBackup []InfoBackup
// RestoreDiskFromFile response
type InfoRestoredDisk struct {
// Compute ID
ComputeID uint64 `json:"computeId"`
// Disk ID
DiskID uint64 `json:"diskId"`
}
// RestoreDisksFromFile response
type ListInfoRestoredDisk []InfoRestoredDisk
2026-08-28 16:36:41 +03:00
// Main info about all backups running on the machine
type TotalBackupsInfo struct {
// Backup type
Type uint64 `json:"type"`
// Time elapsed, ms
TimeElapsedMs uint64 `json:"time_elapsed_ms"`
// Time remaining, ms
TimeRemainingMs uint64 `json:"time_remaining_ms"`
// Total data size, bytes
DataTotalBytes uint64 `json:"data_total_bytes"`
// Processed data size, bytes
DataProcessedBytes uint64 `json:"data_processed_bytes"`
// Remaining data size, bytes
DataRemainingBytes uint64 `json:"data_remaining_bytes"`
// Total memory size, bytes
MemTotalBytes uint64 `json:"mem_total_bytes"`
// Processed memory size, bytes
MemProcessedBytes uint64 `json:"mem_processed_bytes"`
// Remaining memory size, bytes
MemRemainingBytes uint64 `json:"mem_remaining_bytes"`
// Total file size, bytes
FileTotalBytes uint64 `json:"file_total_bytes"`
// Processed file size, bytes
FileProcessedBytes uint64 `json:"file_processed_bytes"`
// Remaining file size, bytes
FileRemainingBytes uint64 `json:"file_remaining_bytes"`
}
// List of disk names and backup speed
type ListDisksWithSpeed []DiskWithSpeed
type DiskWithSpeed struct {
// Device name
Device string `json:"device"`
// Backup speed limit in MB/s; 0 means unlimited
Speed uint64 `json:"speed"`
}