syntax = "proto3"; package v1; option go_package = "github.com/garethgeorge/resticui/go/proto/v1"; import "v1/restic.proto"; message OperationList { repeated Operation operations = 1; } message Operation { // required, primary ID of the operation. int64 id = 1; // required, repo id if associated with a repo string repo_id = 2; // required, plan id if associated with a plan string plan_id = 3; // optional snapshot id if associated with a snapshot. string snapshot_id = 8; OperationStatus status = 4; // required, unix time in milliseconds of the operation's creation (ID is derived from this) int64 unix_time_start_ms = 5; // optional, unix time in milliseconds of the operation's completion int64 unix_time_end_ms = 6; // optional, human readable context message, typically an error message. string display_message = 7; oneof op { OperationBackup operation_backup = 100; OperationIndexSnapshot operation_index_snapshot = 101; } } // OperationEvent is used in the wireformat to stream operation changes to clients message OperationEvent { OperationEventType type = 1; Operation operation = 2; } // OperationEventType indicates whether the operation was created or updated enum OperationEventType { EVENT_UNKNOWN = 0; EVENT_CREATED = 1; EVENT_UPDATED = 2; } enum OperationStatus { STATUS_UNKNOWN = 0; STATUS_PENDING = 1; STATUS_INPROGRESS = 2; STATUS_SUCCESS = 3; STATUS_ERROR = 4; } message OperationBackup { BackupProgressEntry last_status = 3; } // OperationIndexSnapshot tracks that a snapshot was detected by resticui. message OperationIndexSnapshot { ResticSnapshot snapshot = 2; }