blob: b3ffb70245b9e10645a56684f354ecc7912de833 [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 {
Adrià Vilanova Martínez86103142021-09-03 15:13:20 +020031 bool with_nonactive_kill_switches = 1;
avm9996383f8f292021-08-24 18:26:52 +020032}
33
34message GetKillSwitchOverviewResponse {
35 repeated KillSwitch kill_switches = 1;
36}
37
38message ListFeaturesRequest {
39 bool with_deprecated_features = 1;
40}
41
42message ListFeaturesResponse {
43 repeated Feature features = 1;
44}
45
46message SyncFeaturesRequest {
47 repeated Feature features = 1;
48}
49
50message SyncFeaturesResponse {
51}
52
53message EnableKillSwitchRequest {
54 KillSwitch kill_switch = 1;
55}
56
57message EnableKillSwitchResponse {
58}
59
60message DisableKillSwitchRequest {
61 int32 kill_switch_id = 1;
62}
63
64message DisableKillSwitchResponse {
65}
66
67message ListAuthorizedUsersRequest {
68}
69
70message ListAuthorizedUsersResponse {
Adrià Vilanova Martínez25e12112021-08-25 13:48:06 +020071 repeated KillSwitchAuthorizedUser users = 1;
avm9996383f8f292021-08-24 18:26:52 +020072}
73
74message AddAuthorizedUserRequest {
75 KillSwitchAuthorizedUser user = 1;
76}
77
78message AddAuthorizedUserResponse {
79}
80
81message UpdateAuthorizedUserRequest {
82 int32 user_id = 1;
83 KillSwitchAuthorizedUser user = 2;
84}
85
86message UpdateAuthorizedUserResponse {
87}
88
89message DeleteAuthorizedUserRequest {
90 int32 user_id = 1;
91}
92
93message DeleteAuthorizedUserResponse {
94}