-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathschema.proto
65 lines (54 loc) · 1.17 KB
/
schema.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
syntax = "proto3";
package stwno_mensa_api;
// The ingredients service definition.
service Ingredients {
// Returns ingredients
rpc GetIngredients (IngredientsRequest) returns (IngredientsResponse) {}
}
// The ingredients request, may containing a key
message IngredientsRequest {
string key = 1;
}
// The ingredients response
message IngredientsResponse {
Error error = 1;
repeated Ingredient ingredients = 2;
}
// The ingredients object
message Ingredient {
string key = 1;
string value = 2;
}
// The items service definition.
service Items {
// Returns items
rpc GetItems (ItemsRequest) returns (ItemsResponse) {}
}
// The items request, may containing arguments
message ItemsRequest {
string location = 1;
string day = 2;
}
// The items response
message ItemsResponse {
Error error = 1;
repeated Item items = 2;
}
message Item {
string name = 1;
string date = 2;
string day = 3;
string category = 4;
repeated string labels = 5;
repeated Ingredient ingredients = 6;
message Price {
string students = 1;
string employees = 2;
string guests = 3;
}
Price price = 7;
}
message Error {
string name = 1;
string message = 2;
}