Files
archive-control-proto/proto/archive_control/v1/client.proto
T

91 lines
2.3 KiB
Protocol Buffer

syntax = "proto3";
package archive_control.v1;
import "archive_control/v1/common.proto";
import "archive_control/v1/job.proto";
import "archive_control/v1/route.proto";
import "google/protobuf/duration.proto";
enum ClientFeature {
CLIENT_FEATURE_UNSPECIFIED = 0;
CLIENT_FEATURE_INVENTORY_CHUNKS = 1;
CLIENT_FEATURE_CONTENT_TREE = 2;
CLIENT_FEATURE_ROUTE_PROVISIONING = 3;
CLIENT_FEATURE_HARD_LINK = 4;
CLIENT_FEATURE_REFLINK = 5;
CLIENT_FEATURE_SPARSE_FILES = 6;
CLIENT_FEATURE_PARTFILE_MIGRATION = 7;
CLIENT_FEATURE_PARTFILE_MERGE = 8;
CLIENT_FEATURE_QB_STOPPED_ADD = 9;
CLIENT_FEATURE_EVICTION = 10;
CLIENT_FEATURE_DB_BACKUP = 11;
}
message FilesystemCapabilities {
string root_name = 1;
bool readable = 2;
bool writable = 3;
bool hard_link = 4;
bool reflink = 5;
bool sparse_files = 6;
string detail = 7;
}
message ClientCapabilities {
repeated ClientFeature features = 1;
repeated ServiceHealth services = 2;
repeated FilesystemCapabilities filesystems = 3;
repeated LocalRoute routes = 4;
string syncthing_device_id = 5;
repeated string syncthing_advertised_addresses = 6;
string qbittorrent_version = 7;
string qbittorrent_web_api_version = 8;
string libtorrent_version = 9;
string syncthing_version = 10;
repeated string supported_partfile_formats = 11;
uint32 max_envelope_bytes = 12;
}
message ActiveJobCursor {
string job_id = 1;
uint64 job_revision = 2;
uint64 last_event_sequence = 3;
JobState state = 4;
bool committed = 5;
}
// RegisterRequest must be the first application message on each WebSocket.
// shared_token is forbidden in every other message and must never be logged.
message RegisterRequest {
ProtocolVersion protocol_version = 1;
ClientIdentity client = 2;
string connection_instance_id = 3;
string shared_token = 4;
ClientCapabilities capabilities = 5;
repeated ActiveJobCursor active_jobs = 6;
}
enum RegistrationStatus {
REGISTRATION_STATUS_UNSPECIFIED = 0;
REGISTRATION_STATUS_ACCEPTED = 1;
REGISTRATION_STATUS_REJECTED = 2;
}
message RegisterResponse {
RegistrationStatus status = 1;
ProtocolVersion negotiated_version = 2;
string connection_id = 3;
google.protobuf.Duration heartbeat_interval = 4;
google.protobuf.Duration heartbeat_timeout = 5;
Error error = 6;
}
message Heartbeat {
uint64 sequence = 1;
}
message HeartbeatAck {
uint64 sequence = 1;
}