bilibili-base / powermock

Support for gRPC/HTTP protocol, feature-rich Mock Server implementation.
Apache License 2.0
102 stars 22 forks source link

grpc message内嵌套message类型的数据如何传mock值 #14

Closed yangzhao5566 closed 7 months ago

yangzhao5566 commented 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 如何传值呢