61 lines
1003 B
Protocol Buffer
61 lines
1003 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "gen/grpc";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
message ActionButton {
|
|
string title = 1;
|
|
string icon = 2;
|
|
}
|
|
|
|
message GetButtonsResponse {
|
|
string title = 1;
|
|
repeated ActionButton actions = 2;
|
|
}
|
|
|
|
message GetButtonsRequest {}
|
|
|
|
message StartActionRequest {
|
|
string actionName = 1;
|
|
}
|
|
|
|
message StartActionResponse {
|
|
string stdout = 1;
|
|
string stderr = 2;
|
|
bool timedOut = 3;
|
|
int32 exitCode = 4;
|
|
}
|
|
|
|
message GetLogsRequest{};
|
|
|
|
message LogEntry {
|
|
string datetime = 1;
|
|
string content = 2;
|
|
}
|
|
|
|
message GetLogsResponse {
|
|
repeated LogEntry logs = 1;
|
|
}
|
|
|
|
service OliveTinApi {
|
|
rpc GetButtons(GetButtonsRequest) returns (GetButtonsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/GetButtons"
|
|
};
|
|
}
|
|
|
|
rpc StartAction(StartActionRequest) returns (StartActionResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/StartAction"
|
|
};
|
|
}
|
|
|
|
rpc GetLogs(GetLogsRequst) returns (GetLogsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/GetLogs"
|
|
}
|
|
}
|
|
|
|
}
|