Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
615 B
32 lines
615 B
5 years ago
|
syntax = "proto3";
|
||
|
|
||
|
package foo;
|
||
|
option php_namespace = "Php\\Test";
|
||
|
option php_metadata_namespace = "Metadata\\Php\\Test";
|
||
|
|
||
|
message TestNamespace {
|
||
|
int32 a = 1;
|
||
|
|
||
|
// Test nested messages, enums, and reserved names
|
||
|
NestedMessage nested_message = 2;
|
||
|
NestedEnum nested_enum = 3;
|
||
|
Empty reserved_name = 4;
|
||
|
message NestedMessage {
|
||
|
int32 a = 1;
|
||
|
}
|
||
|
enum NestedEnum {
|
||
|
ZERO = 0;
|
||
|
};
|
||
|
// Test reserved name
|
||
|
message Empty {
|
||
|
NestedMessage nested_message = 1;
|
||
|
NestedEnum nested_enum = 2;
|
||
|
message NestedMessage {
|
||
|
int32 a = 1;
|
||
|
}
|
||
|
enum NestedEnum {
|
||
|
ZERO = 0;
|
||
|
};
|
||
|
}
|
||
|
}
|