-
Notifications
You must be signed in to change notification settings - Fork 408
/
Copy pathservice-corredor.proto
150 lines (118 loc) · 3.67 KB
/
service-corredor.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
syntax = "proto3";
package corredor;
// Executing and listing server-scripts
service ServerScripts {
// Executes server script
rpc Exec(ExecRequest) returns (ExecResponse);
// List of server scripts
rpc List(ServerScriptListRequest) returns (ServerScriptListResponse);
}
// Executing and listing client-scripts
service ClientScripts {
// Bundles
rpc Bundle (BundleRequest) returns (BundleResponse);
// List of client scripts
rpc List(ClientScriptListRequest) returns (ClientScriptListResponse);
}
service Storage {
// rpc List(path) returns (list of dirs/files);
// rpc Store(path, content) returns (bool);
// rpc Delete(path, content) returns (bool);
// rpc Get(path) returns (file);
}
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
message ExecRequest {
string name = 1;
map<string, string> args = 2;
}
message ExecResponse {
map<string, string> result = 2;
}
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
message ServerScriptListRequest {
// query by name, label, description
string query = 1;
// filter by resource - exact match
string resourceType = 2;
// filter by events - script must contain all specified events
repeated string eventTypes = 3;
}
message ServerScriptListResponse {
repeated ServerScript scripts = 1;
}
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
message ClientScriptListRequest {
// query by name, label, description
string query = 1;
// filter by resource - exact match
string resourceType = 2;
// filter by events - script must contain all specified events
repeated string eventTypes = 3;
// filter by bundle - exact match
string bundle = 4;
}
message ClientScriptListResponse {
repeated ClientScript scripts = 1;
}
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
message BundleRequest {
string name = 1;
}
message BundleResponse {
repeated Bundle bundles = 1;
}
// ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
message ServerScript {
string name = 1;
string label = 2;
string description = 3;
string updatedAt = 12;
Security security = 13;
repeated Trigger triggers = 14;
Iterator iterator = 11;
repeated string errors = 15;
}
message ClientScript {
string name = 1;
string label = 2;
string description = 3;
string bundle = 4;
string type = 6;
string updatedAt = 12;
Security security = 13;
repeated Trigger triggers = 14;
repeated string errors = 15;
}
message Security {
string runAs = 1;
repeated string deny = 2;
repeated string allow = 3;
}
message Trigger {
repeated string eventTypes = 1;
repeated string resourceTypes = 2;
repeated TUIProp uiProps = 14;
repeated TConstraint constraints = 15;
}
message Iterator {
string eventType = 1;
string resourceType = 2;
repeated string deferred = 3;
map<string, string> filter = 4;
string action = 5;
repeated TUIProp uiProps = 14;
}
message TConstraint {
string name = 1;
string op = 2;
repeated string value = 3;
}
message TUIProp {
string name = 1;
string value = 2;
}
message Bundle {
string name = 1;
string type = 2;
string code = 3;
}