This repository was archived by the owner on Apr 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathab.proto
66 lines (53 loc) · 1.52 KB
/
ab.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
syntax = "proto3";
package otsimo.abtest;
import weak "gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.goproto_getters_all) = false;
option objc_class_prefix = "OTS";
option go_package = "otsimopb";
option java_package = "com.otsimo.grpc";
option java_multiple_files = true;
message ABTestGroup {
string name = 1;
string app_id = 2;
int32 weight = 3;
bool active = 4;
}
message ABDisableReq {
string name = 1;
string app_id = 2;
}
message ListTestGroupReq { string app_id = 1; }
message AppTestingStatus {
int32 version = 1;
repeated ABTestGroup tests = 2;
}
message CheckUserStatusReq { string user_id = 1; }
message ChangeUserTestGroupReq {
string user_id = 1;
string app_id = 3;
// TestGroupName is empty for no testing group
string test_group_name = 4;
}
message UserTestGroupStatus {
message AppGroup {
string app_id = 1;
string test_group = 2;
int32 version = 3;
}
string user_id = 1;
repeated AppGroup apps = 2;
}
// ABTest Service
service ABTest {
// CreateTestGroup
rpc CreateTestGroup(ABTestGroup) returns (AppTestingStatus);
// DisableTestGroup
rpc DisableTestGroup(ABDisableReq) returns (AppTestingStatus);
// ListTestGroupsForApp
rpc ListTestGroupsForApp(ListTestGroupReq) returns (AppTestingStatus);
rpc CheckUserStatus(CheckUserStatusReq) returns (UserTestGroupStatus);
rpc ChangeUserTestGroup(ChangeUserTestGroupReq) returns (UserTestGroupStatus);
}