82 lines
1.8 KiB
Go
82 lines
1.8 KiB
Go
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"`
|
|
|
|
// Possible error
|
|
Error string `json:"error"`
|
|
}
|
|
|
|
// 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
|
|
|
|
// 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"`
|
|
}
|