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

71 lines
1.8 KiB
Protocol Buffer

syntax = "proto3";
package archive_control.v1;
import "google/protobuf/timestamp.proto";
enum SyncthingFolderType {
SYNCTHING_FOLDER_TYPE_UNSPECIFIED = 0;
SYNCTHING_FOLDER_TYPE_SEND_RECEIVE = 1;
SYNCTHING_FOLDER_TYPE_SEND_ONLY = 2;
SYNCTHING_FOLDER_TYPE_RECEIVE_ONLY = 3;
SYNCTHING_FOLDER_TYPE_OTHER = 4;
}
enum RouteState {
ROUTE_STATE_UNSPECIFIED = 0;
ROUTE_STATE_DISCOVERED = 1;
ROUTE_STATE_PROVISIONING = 2;
ROUTE_STATE_VERIFYING = 3;
ROUTE_STATE_READY = 4;
ROUTE_STATE_PAUSED = 5;
ROUTE_STATE_UNHEALTHY = 6;
ROUTE_STATE_UNSUPPORTED = 7;
}
// LocalRoute is a client's non-secret view of one Syncthing folder. route_id is
// the Syncthing folder ID. Archive Control routes must have exactly two devices.
message LocalRoute {
string route_id = 1;
string local_relative_path = 2;
SyncthingFolderType folder_type = 3;
string local_syncthing_device_id = 4;
repeated string peer_syncthing_device_ids = 5;
RouteState state = 6;
bool writable = 7;
bool sparse_supported = 8;
bool archive_control_created = 9;
string detail = 10;
google.protobuf.Timestamp observed_at = 11;
}
message RouteDescriptor {
string route_id = 1;
string archive_client_id = 2;
string cache_client_id = 3;
string archive_syncthing_device_id = 4;
string cache_syncthing_device_id = 5;
RouteState state = 6;
google.protobuf.Timestamp verified_at = 7;
string detail = 8;
}
message EnsureRouteSpec {
string route_id = 1;
string peer_client_id = 2;
string peer_syncthing_device_id = 3;
repeated string peer_addresses = 4;
string local_relative_path = 5;
uint32 setup_timeout_seconds = 6;
}
message RouteVerification {
string route_id = 1;
string nonce = 2;
bool local_nonce_seen_by_peer = 3;
bool peer_nonce_seen_locally = 4;
RouteState state = 5;
string detail = 6;
google.protobuf.Timestamp observed_at = 7;
}