-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata.proto
122 lines (100 loc) · 2.03 KB
/
data.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
// protoc --go_out=. ./data.proto
syntax = "proto3";
package data;
option go_package = "./common/models";
message HealthResponse {
bool all = 1;
bool scraper = 2;
bool weather = 3;
}
message APIResponse {
bool success = 1;
string message = 2;
}
message Duplicates {
repeated int64 values = 1;
}
message Metadata {
map<string, Duplicates> designators = 1;
map<string, Duplicates> full_names = 2;
}
message Condition {
string name = 1;
string description = 2;
}
message Temperature {
double current = 1;
double min = 2;
double max = 3;
}
message Forecast {
Condition condition = 1;
Temperature temperature = 2;
int64 sunrise = 3;
int64 sunset = 4;
int64 dayOfWeek = 5;
}
message ForecastResponse {
string name = 1;
repeated Forecast forecast = 2;
}
message CurrentWeatherResponse {
string name = 1;
Condition condition = 2;
Temperature temperature = 3;
int64 sunrise = 4;
int64 sunset = 5;
}
message AirPollutionResponse {
map<string, double> components = 1;
}
message Timestamp {
int64 hour = 1;
int64 minute = 2;
}
message TimeRange {
Timestamp start = 1;
Timestamp end = 2;
}
message Lesson {
string full_name = 1;
string teacher_designator = 2;
int64 teacher_index = 3;
string room_designator = 4;
int64 room_index = 5;
string division_designator = 6;
int64 division_index = 7;
TimeRange time_range = 8;
}
message LessonGroup {
repeated Lesson lessons = 1;
}
message ScheduleDay {
repeated LessonGroup lesson_groups = 1;
}
message Schedule {
repeated ScheduleDay schedule_days = 1;
}
message Teacher {
int64 index = 1;
string designator = 2;
string full_name = 3;
Schedule schedule = 4;
}
message Room {
int64 index = 1;
string designator = 2;
string full_name = 3;
Schedule schedule = 4;
}
message Division {
int64 index = 1;
string designator = 2;
string full_name = 3;
Schedule schedule = 4;
}
message School {
repeated Division divisions = 1;
repeated Teacher teachers = 2;
repeated Room rooms = 3;
}