forked from golang/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhello.proto
70 lines (60 loc) · 1.7 KB
/
hello.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
syntax = "proto3";
import "thrift.proto";
// Greeting comment.
//enum Greeting {
// // NONE comment.
// NONE = 0;
// // MR comment.
// MR = 1;
// // MRS comment.
// MRS = 2;
// // MISS comment.
// MISS = 3;
//}
//
//// Hello comment.
//message Hello {
// // greeting comment.
// Greeting greeting = 1 [(thrift.field_ord) = 1];
// // name comment.
// string name = 2 [(thrift.field_ord) = 2];
// // here's yet another comment
// oneof dunno {
// option (thrift.oneof_ord) = 3;
// string some_string = 3 [(thrift.field_ord) = 1];
// int32 some_int = 4 [(thrift.field_ord) = 2];
// }
//}
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user's name.
message HelloRequest {
string name = 1 [(thrift.field_ord) = 1];
}
// The response message containing the greetings
message HelloReply {
string message = 1 [(thrift.field_ord) = 1];
}
message Foo {
oneof arg {
option (thrift.oneof_ord) = 1;
string name = 1 [(thrift.field_ord) = 1];
int32 age = 2 [(thrift.field_ord) = 2];
Bar bar = 3 [(thrift.field_ord) = 3];
}
string text = 4 [(thrift.field_ord) = 2];
int32 integer = 5 [(thrift.field_ord) = 3];
Bar quux = 6 [(thrift.field_ord) = 4];
//repeated int32 ints = 7 [(thrift.field_ord) = 5];
repeated Bar bars = 7 [(thrift.field_ord) = 5];
map<int32, int32> amap = 8 [(thrift.field_ord) = 6];
//repeated Bar bars = 6 [(thrift.field_ord) = 4];
//repeated int32 ints = 7 [(thrift.field_ord) = 5];
}
message Bar {
string quux = 1 [(thrift.field_ord) = 1];
bool glob = 2 [(thrift.field_ord) = 2];
}