-
Notifications
You must be signed in to change notification settings - Fork 1
/
undercroft.proto
166 lines (139 loc) · 3.54 KB
/
undercroft.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
syntax = "proto3";
// Storage of applications
package undercroft;
option go_package = "github.com/cubex/proto-go/undercroft";
message VendorRequest {
string id = 1;
}
message VendorRegisterRequest {
string project_id = 1;
string id = 2;
string name = 3;
string description = 4;
}
message VendorRegisterResponse {
string id = 1;
string entity_code = 2;
string secret = 3;
}
message VendorResponse {
string id = 1;
string name = 2;
string description = 3;
string entity_code = 4;
}
message VendorUpdateRequest {
string id = 1;
string name = 2;
string description = 3;
}
message VendorListRequest {
string project_id = 1;
}
message VendorUpdateResponse {
string id = 1;
bool updated = 2;
}
message VendorsResponse {
repeated VendorResponse vendors = 1;
}
message AppRequest {
string vendor_id = 1;
string id = 2;
bool include_yaml = 3;
}
message AppsRetrieveRequest {
repeated AppRequest request = 1;
string language = 2;
}
message AppSummaryResponse {
string vendor_id = 1;
string id = 2;
string name = 3;
string description = 4;
string category = 5;
string group = 6;
string icon = 7;
string app_type = 8;
}
message AppResponse {
string vendor_id = 1;
string id = 2;
string definition_yaml = 3;
}
message AppSummariesResponse {
repeated AppSummaryResponse apps = 1;
}
message AppsResponse {
repeated AppResponse apps = 1;
}
message AppListRequest {
string vendor_id = 1;
bool include_yaml = 2;
repeated AppRequest filter = 3;
}
message AppRegisterRequest {
string vendor_id = 1;
string id = 2;
string vendor_secret = 3;
string definition_yaml = 4;
}
message AppRegisterResponse {
string vendor_id = 1;
string id = 2;
string entity_code = 3;
}
message AppUpdateRequest {
string vendor_id = 1;
string id = 2;
string definition_yaml = 3;
}
message AppUpdateResponse {
string vendor_id = 1;
string id = 2;
bool updated = 3;
}
message GroupRequest {
string vendor_id = 1;
string id = 2;
bool include_yaml = 3;
}
message GroupResponse {
string vendor_id = 1;
string id = 2;
repeated string app_ids = 3;
string definition_yaml = 4;
}
message GroupsResponse {
repeated GroupResponse groups = 1;
}
message GroupListRequest {
string vendor_id = 1;
}
message GroupRegisterRequest {
string vendor_id = 1;
string id = 2;
string vendor_secret = 3;
string definition_yaml = 4;
}
message GroupUpdateRequest {
string vendor_id = 1;
string id = 2;
string definition_yaml = 3;
}
service Undercroft {
rpc RetrieveVendor (VendorRequest) returns (VendorResponse);
rpc UpdateVendor (VendorUpdateRequest) returns (VendorUpdateResponse);
rpc RegisterVendor (VendorRegisterRequest) returns (VendorRegisterResponse);
rpc ListVendors (VendorListRequest) returns (VendorsResponse);
rpc RetrieveApp (AppRequest) returns (AppResponse);
rpc ListApps (AppListRequest) returns (AppsResponse);
rpc RetrieveApps (AppsRetrieveRequest) returns (AppSummariesResponse);
rpc RegisterApp (AppRegisterRequest) returns (AppRegisterResponse);
rpc DeRegisterApp (AppRequest) returns (AppUpdateResponse);
rpc UpdateApp (AppUpdateRequest) returns (AppUpdateResponse);
rpc RetrieveGroup (GroupRequest) returns (GroupResponse);
rpc ListGroups (GroupListRequest) returns (GroupsResponse);
rpc RegisterGroup (GroupRegisterRequest) returns (GroupResponse);
rpc UpdateGroup (GroupUpdateRequest) returns (GroupResponse);
}