mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
* refactor: migrate from protobuf to simple-protobuf * update go.mod * fix server * Update gRPC.cpp * Update gRPC.cpp
25 lines
525 B
Protocol Buffer
25 lines
525 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
package tutorial;
|
|
|
|
message Person {
|
|
optional string name = 1;
|
|
optional int32 id = 2;
|
|
optional string email = 3;
|
|
|
|
enum PhoneType {
|
|
PHONE_TYPE_UNSPECIFIED = 0;
|
|
PHONE_TYPE_MOBILE = 1;
|
|
PHONE_TYPE_HOME = 2;
|
|
PHONE_TYPE_WORK = 3;
|
|
}
|
|
|
|
message PhoneNumber {
|
|
optional string number = 1;
|
|
optional PhoneType type = 2 [ default = PHONE_TYPE_HOME ];
|
|
}
|
|
|
|
repeated PhoneNumber phones = 4;
|
|
}
|
|
|
|
message AddressBook { repeated Person people = 1; } |