mirror of
https://github.com/samuelncui/yatm.git
synced 2026-01-05 13:05:42 +00:00
70 lines
1.3 KiB
Protocol Buffer
70 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
package job_restore;
|
|
option go_package = "github.com/samuelncui/yatm/entity";
|
|
|
|
import "copy_status.proto";
|
|
|
|
enum JobRestoreStep {
|
|
PENDING = 0;
|
|
WAIT_FOR_TAPE = 1;
|
|
COPYING = 2;
|
|
|
|
FINISHED = 255;
|
|
}
|
|
|
|
message JobRestoreParam {
|
|
repeated int64 file_ids = 1;
|
|
}
|
|
|
|
message JobRestoreNextParam {
|
|
oneof param {
|
|
JobRestoreWaitForTapeParam wait_for_tape = 1;
|
|
JobRestoreCopyingParam copying = 2;
|
|
JobRestoreFinishedParam finished = 255;
|
|
}
|
|
}
|
|
|
|
message JobRestoreWaitForTapeParam {}
|
|
|
|
message JobRestoreCopyingParam {
|
|
string device = 1;
|
|
}
|
|
|
|
message JobRestoreFinishedParam {}
|
|
|
|
message RestoreFile {
|
|
int64 file_id = 1;
|
|
int64 tape_id = 2;
|
|
int64 position_id = 3;
|
|
|
|
copy_status.CopyStatus status = 17;
|
|
int64 size = 18;
|
|
bytes hash = 19;
|
|
|
|
string tape_path = 33;
|
|
string target_path = 34;
|
|
}
|
|
|
|
message RestoreTape {
|
|
int64 tape_id = 1;
|
|
string barcode = 2;
|
|
|
|
copy_status.CopyStatus status = 17;
|
|
repeated RestoreFile files = 18;
|
|
}
|
|
|
|
message JobRestoreState {
|
|
JobRestoreStep step = 1;
|
|
repeated RestoreTape tapes = 2;
|
|
}
|
|
|
|
message JobRestoreDisplay {
|
|
int64 copied_bytes = 1;
|
|
int64 copied_files = 2;
|
|
int64 total_bytes = 3;
|
|
int64 total_files = 4;
|
|
|
|
optional int64 speed = 5;
|
|
int64 start_time = 6;
|
|
}
|