-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.proto
86 lines (69 loc) · 1.69 KB
/
test.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
syntax = "proto3";
package test;
option go_package = "./pb";
// this is leading detached
// but i don't know why
// this is also leading detached
// comments 1
// comments 1.1
message TestMessage {
message NestedTest {
// @verify: eq=100,lt=10,eq=299
int32 code = 1;
// result is the result
// @verify: eq=3,ne=helloworld
string result = 2;
}
// but is
// comments 2
// comments 2.2
// @verify: eq=290
// int32 tAge = 1;
string tName = 2 [ json_name = "t_name" ]; // comments 3
// this is what you came for
// @verify:eq=false
bool tBoolean = 3;
// @verify: eq=3,gt=10
int64 tAge4 = 4;
// @verify: eq=3,gte=10
uint32 tAge5 = 5;
// @verify: eq=3,lt=10
uint64 tAge6 = 6;
// @verify: eq=3,lte=23
sint32 tAge7 = 7;
// @verify: eq=3,ne=100
sint64 tAge8 = 8;
// @verify: eq=3,gt=12
fixed32 tAge9 = 9;
// @verify: eq=3,lt=23
fixed64 tAge10 = 10;
// @verify: eq=3,ne=23,lt=12
sfixed32 tAge11 = 11;
// @verify: eq=3,gte=10,ne=32,lte=12
sfixed64 tAge12 = 12;
// @verify: len=10
bytes serial = 13;
// @verify: len=20
string testStr = 14;
// @verify: len=120,ne=12
repeated NestedTest repeatedNested = 15;
// @verify: len=12
NestedTest nested = 16;
// @verify: len=10,ne=12
map<int32, string> mapField = 17;
// @verify: alpha
string alphaTest = 18;
// @verify: number
string numberTest = 19;
// @verify: contains=hello|world
string containsTest = 20;
// @verify: startswith=hello|world
string startsWithTest = 21;
// @verify: endswith=hello|world
string endsWithTest = 22;
// @verify: len=12
oneof oneofField {
int32 intMember = 23;
NestedTest nestedMember = 24;
}
} // are you ok?