-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapplications.proto
72 lines (61 loc) · 1.49 KB
/
applications.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
syntax = "proto3";
package applications;
option go_package = "github.com/cubex/proto-go/applications";
message HTTPRequest {
message HTTPParameter {
repeated string values = 1;
}
string path = 1;
string method = 2;
map<string, HTTPParameter> post_params = 3;
string query_string = 4;
string body = 5;
string language = 6;
string content_type = 7;
enum RequestType {
REQUEST = 0;
PAGE_DEFINITION = 1;
}
RequestType request_type = 8;
}
message HTTPResponse {
int32 status_code = 1;
string body = 2;
string content_type = 3;
string language = 4;
message HTTPHeaderParameter {
repeated string values = 1;
}
map<string, HTTPHeaderParameter> headers = 5;
}
enum SocketAction {
SUBSCRIBE = 0;
UNSUBSCRIBE = 1;
}
message SocketRequest {
string socket_id = 1;
SocketAction action = 2;
string payload = 3;
}
message ProjectModifyRequest {
string project_id = 1;
enum ModifyMode {
UNKNOWN = 0;
INSTALL = 1;
UNINSTALL = 2;
SUSPEND = 3;
REACTIVATE = 4;
CANCEL = 5;
BILLING = 6;
}
ModifyMode mode = 2;
map<string, string> data = 3;
}
message ProjectModifyResponse {
bool success = 1;
}
service Application {
rpc HandleHTTPRequest (HTTPRequest) returns (HTTPResponse);
rpc HandleSocketAction (SocketRequest) returns (HTTPResponse);
rpc ModifyRelationship (ProjectModifyRequest) returns (ProjectModifyResponse);
}