2022-03-22 11:03:15 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package debugd;
|
|
|
|
|
2023-03-23 13:08:49 -04:00
|
|
|
option go_package = "github.com/edgelesssys/constellation/v2/debugd/service";
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
service Debugd {
|
2023-03-23 13:08:49 -04:00
|
|
|
rpc SetInfo(SetInfoRequest) returns (SetInfoResponse) {}
|
|
|
|
rpc GetInfo(GetInfoRequest) returns (GetInfoResponse) {}
|
|
|
|
rpc UploadFiles(stream FileTransferMessage) returns (UploadFilesResponse) {}
|
|
|
|
rpc DownloadFiles(DownloadFilesRequest) returns (stream FileTransferMessage) {}
|
|
|
|
rpc UploadSystemServiceUnits(UploadSystemdServiceUnitsRequest) returns (UploadSystemdServiceUnitsResponse) {}
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
2022-11-16 10:43:54 -05:00
|
|
|
message SetInfoRequest {
|
2023-03-23 13:08:49 -04:00
|
|
|
repeated Info info = 1;
|
2022-11-16 10:43:54 -05:00
|
|
|
}
|
|
|
|
|
2023-01-20 04:11:41 -05:00
|
|
|
message SetInfoResponse {
|
2023-03-23 13:08:49 -04:00
|
|
|
SetInfoStatus status = 1;
|
2023-01-20 04:11:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
enum SetInfoStatus {
|
2023-03-23 13:08:49 -04:00
|
|
|
SET_INFO_SUCCESS = 0;
|
|
|
|
SET_INFO_ALREADY_SET = 1;
|
2023-01-20 04:11:41 -05:00
|
|
|
}
|
2022-11-16 10:43:54 -05:00
|
|
|
|
|
|
|
message GetInfoRequest {}
|
|
|
|
|
|
|
|
message GetInfoResponse {
|
2023-03-23 13:08:49 -04:00
|
|
|
repeated Info info = 1;
|
2022-11-16 10:43:54 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message Info {
|
2023-03-23 13:08:49 -04:00
|
|
|
string key = 1;
|
|
|
|
string value = 2;
|
2022-11-16 10:43:54 -05:00
|
|
|
}
|
|
|
|
|
2023-01-20 04:11:41 -05:00
|
|
|
message DownloadFilesRequest {}
|
2022-11-16 10:43:54 -05:00
|
|
|
|
2023-01-20 04:11:41 -05:00
|
|
|
message FileTransferMessage {
|
2023-03-23 13:08:49 -04:00
|
|
|
oneof kind {
|
|
|
|
FileTransferHeader header = 1; // start of transfer
|
|
|
|
Chunk chunk = 2; // file content as chunks
|
|
|
|
}
|
2023-01-20 04:11:41 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
message FileTransferHeader {
|
2023-03-23 13:08:49 -04:00
|
|
|
string targetPath = 1;
|
|
|
|
uint32 mode = 3;
|
|
|
|
optional string overrideServiceUnit = 4;
|
2023-01-20 04:11:41 -05:00
|
|
|
}
|
2022-03-22 11:03:15 -04:00
|
|
|
|
|
|
|
message Chunk {
|
2023-03-23 13:08:49 -04:00
|
|
|
bytes content = 1;
|
|
|
|
bool last = 2;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
2023-01-20 04:11:41 -05:00
|
|
|
message UploadFilesResponse {
|
2023-03-23 13:08:49 -04:00
|
|
|
UploadFilesStatus status = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
2023-01-20 04:11:41 -05:00
|
|
|
enum UploadFilesStatus {
|
2023-03-23 13:08:49 -04:00
|
|
|
UPLOAD_FILES_SUCCESS = 0;
|
|
|
|
UPLOAD_FILES_UPLOAD_FAILED = 1;
|
|
|
|
UPLOAD_FILES_ALREADY_STARTED = 2;
|
|
|
|
UPLOAD_FILES_ALREADY_FINISHED = 3;
|
|
|
|
UPLOAD_FILES_START_FAILED = 4;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ServiceUnit {
|
2023-03-23 13:08:49 -04:00
|
|
|
string name = 1;
|
|
|
|
string contents = 2;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message UploadSystemdServiceUnitsRequest {
|
2023-03-23 13:08:49 -04:00
|
|
|
repeated ServiceUnit units = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message UploadSystemdServiceUnitsResponse {
|
2023-03-23 13:08:49 -04:00
|
|
|
UploadSystemdServiceUnitsStatus status = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
enum UploadSystemdServiceUnitsStatus {
|
2023-03-23 13:08:49 -04:00
|
|
|
UPLOAD_SYSTEMD_SERVICE_UNITS_SUCCESS = 0;
|
|
|
|
UPLOAD_SYSTEMD_SERVICE_UNITS_FAILURE = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|