blob: 9b2f450d52f4cc1d63466965938743464457b9bc [file] [log] [blame]
avm9996383f8f292021-08-24 18:26:52 +02001syntax = "proto3";
2
3import "api_proto/common.proto";
4import "api_proto/kill_switch_objects.proto";
5
6option go_package = "gomodules.avm99963.com/twpt-server/api_proto";
7
8service KillSwitchService {
9 rpc GetKillSwitchStatus (GetKillSwitchStatusRequest) returns (GetKillSwitchStatusResponse) {}
10 rpc GetKillSwitchOverview (GetKillSwitchOverviewRequest) returns (GetKillSwitchOverviewResponse) {}
11 rpc ListFeatures (ListFeaturesRequest) returns (ListFeaturesResponse) {}
12 rpc SyncFeatures (SyncFeaturesRequest) returns (SyncFeaturesResponse) {}
13 rpc EnableKillSwitch (EnableKillSwitchRequest) returns (EnableKillSwitchResponse) {}
14 rpc DisableKillSwitch (DisableKillSwitchRequest) returns (DisableKillSwitchResponse) {}
15 rpc ListAuthorizedUsers (ListAuthorizedUsersRequest) returns (ListAuthorizedUsersResponse) {}
16 rpc AddAuthorizedUser (AddAuthorizedUserRequest) returns (AddAuthorizedUserResponse) {}
17 rpc UpdateAuthorizedUser (UpdateAuthorizedUserRequest) returns (UpdateAuthorizedUserResponse) {}
18 rpc DeleteAuthorizedUser (DeleteAuthorizedUserRequest) returns (DeleteAuthorizedUserResponse) {}
19}
20
21// Retrieve kill switch status depending on the environment.
22message GetKillSwitchStatusRequest {
23 Environment environment = 1;
24}
25
26message GetKillSwitchStatusResponse {
27 repeated KillSwitch kill_switches = 1;
28}
29
30message GetKillSwitchOverviewRequest {
31}
32
33message GetKillSwitchOverviewResponse {
34 repeated KillSwitch kill_switches = 1;
35}
36
37message ListFeaturesRequest {
38 bool with_deprecated_features = 1;
39}
40
41message ListFeaturesResponse {
42 repeated Feature features = 1;
43}
44
45message SyncFeaturesRequest {
46 repeated Feature features = 1;
47}
48
49message SyncFeaturesResponse {
50}
51
52message EnableKillSwitchRequest {
53 KillSwitch kill_switch = 1;
54}
55
56message EnableKillSwitchResponse {
57}
58
59message DisableKillSwitchRequest {
60 int32 kill_switch_id = 1;
61}
62
63message DisableKillSwitchResponse {
64}
65
66message ListAuthorizedUsersRequest {
67}
68
69message ListAuthorizedUsersResponse {
Adrià Vilanova Martínez25e12112021-08-25 13:48:06 +020070 repeated KillSwitchAuthorizedUser users = 1;
avm9996383f8f292021-08-24 18:26:52 +020071}
72
73message AddAuthorizedUserRequest {
74 KillSwitchAuthorizedUser user = 1;
75}
76
77message AddAuthorizedUserResponse {
78}
79
80message UpdateAuthorizedUserRequest {
81 int32 user_id = 1;
82 KillSwitchAuthorizedUser user = 2;
83}
84
85message UpdateAuthorizedUserResponse {
86}
87
88message DeleteAuthorizedUserRequest {
89 int32 user_id = 1;
90}
91
92message DeleteAuthorizedUserResponse {
93}