-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeringue-admin.proto
82 lines (60 loc) · 1.73 KB
/
meringue-admin.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
syntax = "proto3";
import "google/protobuf/empty.proto";
option java_package = "com.normtronix.meringue";
// Admin Service for managing current races, connecting and
// disconnecting the race meta data for them.
service AdminService {
rpc ping(google.protobuf.Empty) returns (google.protobuf.Empty);
rpc auth(AuthRequest) returns (AuthResponse);
rpc listTracks(google.protobuf.Empty) returns (TrackMetadataResponse);
rpc connectToRaceData(ConnectToRaceDataRequest) returns (RaceDataConnectionResponse);
rpc listRaceDataConnections(google.protobuf.Empty) returns (RaceDataConnectionsResponse);
rpc disconnectRaceData(RaceDataConnectionRequest) returns (google.protobuf.Empty);
rpc listLiveRaces(google.protobuf.Empty) returns (LiveRaceListResponse);
rpc shutdown(google.protobuf.Empty) returns (google.protobuf.Empty);
}
message AuthRequest {
string username = 1;
string password = 2;
}
message AuthResponse {
string bearerToken = 1;
}
message TrackMetadataResponse {
repeated TrackMetaData track = 1;
}
message TrackMetaData {
string code = 1;
string name = 2;
float lat = 3;
float long = 4;
}
enum RaceDataProvider {
PROVIDER_UNKNOWN = 0;
PROVIDER_RM = 1;
}
message ConnectToRaceDataRequest {
RaceDataProvider provider = 1;
string providerId = 2;
string trackCode = 3;
}
message RaceDataConnectionsResponse {
repeated RaceDataConnectionResponse response = 1;
}
message RaceDataConnectionResponse {
bool running = 1;
string handle = 2;
string trackName = 3;
string trackCode = 4;
}
message RaceDataConnectionRequest {
string handle = 1;
}
message LiveRace {
string raceId = 1;
string trackName = 2;
string eventName = 3;
}
message LiveRaceListResponse {
repeated LiveRace races = 1;
}