62 lines
1.0 KiB
Protocol Buffer
62 lines
1.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option go_package = "gen/grpc";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
message ActionButton {
|
|
string id = 1;
|
|
string title = 2;
|
|
string icon = 3;
|
|
}
|
|
|
|
message GetButtonsResponse {
|
|
string title = 1;
|
|
repeated ActionButton actions = 2;
|
|
}
|
|
|
|
message GetButtonsRequest {}
|
|
|
|
message StartActionRequest {
|
|
string actionName = 1;
|
|
}
|
|
|
|
message StartActionResponse {
|
|
LogEntry logEntry = 1;
|
|
}
|
|
|
|
message GetLogsRequest{};
|
|
|
|
message LogEntry {
|
|
string datetime = 1;
|
|
string actionTitle = 2;
|
|
string stdout = 3;
|
|
string stderr = 4;
|
|
bool timedOut = 5;
|
|
int32 exitCode = 6;
|
|
}
|
|
|
|
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(GetLogsRequest) returns (GetLogsResponse) {
|
|
option (google.api.http) = {
|
|
get: "/api/GetLogs"
|
|
};
|
|
}
|
|
}
|