forked from OliveTin/OliveTin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOliveTin.proto
126 lines (100 loc) · 2.22 KB
/
OliveTin.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
syntax = "proto3";
option go_package = "gen/grpc";
import "google/api/annotations.proto";
message Action {
string id = 1;
string title = 2;
string icon = 3;
string url = 4;
bool canExec = 5;
repeated ActionArgument arguments = 6;
}
message ActionArgument {
string name = 1;
string title = 2;
string type = 3;
string defaultValue = 4;
repeated ActionArgumentChoice choices = 5;
}
message ActionArgumentChoice {
string value = 1;
string title = 2;
}
message Entity {
string title = 1;
string icon = 2;
repeated Action actions = 3;
}
message GetDashboardComponentsResponse {
string title = 1;
repeated Action actions = 2;
repeated Entity entities = 3;
}
message GetDashboardComponentsRequest {}
message StartActionRequest {
string actionName = 1;
repeated StartActionArgument arguments = 2;
}
message StartActionArgument {
string name = 1;
string value = 2;
}
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;
string user = 7;
string userClass = 8;
string actionIcon = 9;
}
message GetLogsResponse {
repeated LogEntry logs = 1;
}
message ValidateArgumentTypeRequest {
string value = 1;
string type = 2;
}
message ValidateArgumentTypeResponse {
bool valid = 1;
string description = 2;
}
message WhoAmIRequest {}
message WhoAmIResponse {
string authenticatedUser = 1;
}
service OliveTinApi {
rpc GetDashboardComponents(GetDashboardComponentsRequest) returns (GetDashboardComponentsResponse) {
option (google.api.http) = {
get: "/api/GetDashboardComponents"
};
}
rpc StartAction(StartActionRequest) returns (StartActionResponse) {
option (google.api.http) = {
post: "/api/StartAction"
body: "*"
};
}
rpc GetLogs(GetLogsRequest) returns (GetLogsResponse) {
option (google.api.http) = {
get: "/api/GetLogs"
};
}
rpc ValidateArgumentType(ValidateArgumentTypeRequest) returns (ValidateArgumentTypeResponse) {
option (google.api.http) = {
post: "/api/ValidateArgumentType"
body: "*"
};
}
rpc WhoAmI(WhoAmIRequest) returns (WhoAmIResponse) {
option (google.api.http) = {
get: "/api/WhoAmI"
};
}
}