Closed yangzhao5566 closed 7 months ago
` syntax = "proto3"; import "google/protobuf/struct.proto";
package examples.hello.api; option go_package = "github.com/poloxue/mock/examples/hello";
service Hello { rpc World(HelloRequest) returns (sorld); }
message HelloRequest { string message = 1; }
enum Color { UNKNOWN = 0; RED = 1; GREEN = 2; BLUE = 3; GREEE = 8; }
message sorld { string message = 1; map<string, string> mp = 2; repeated string rp = 3;
oneof one_field { string f1 = 4; string f2 = 5; } google.protobuf.Struct st = 6; Color cl = 7; H h = 8; }
message H { string m1 = 1; string m2 = 2; } `
如上这个pb文件 对于 message sorld 里的 Color和 H 如何传值呢
` syntax = "proto3"; import "google/protobuf/struct.proto";
package examples.hello.api; option go_package = "github.com/poloxue/mock/examples/hello";
service Hello { rpc World(HelloRequest) returns (sorld); }
message HelloRequest { string message = 1; }
enum Color { UNKNOWN = 0; RED = 1; GREEN = 2; BLUE = 3; GREEE = 8; }
message sorld { string message = 1; map<string, string> mp = 2; repeated string rp = 3;
oneof one_field { string f1 = 4; string f2 = 5; } google.protobuf.Struct st = 6; Color cl = 7; H h = 8; }
message H { string m1 = 1; string m2 = 2; } `
如上这个pb文件 对于 message sorld 里的 Color和 H 如何传值呢