我看到 StringValue 是字符串消息的消息包装器,我尝试将其用于:
service SomeService {
// health
rpc HealthCheck(google.protobuf.Empty)
returns (google.protobuf.Empty) {}
// create
rpc CreateSomething(SomeMessageType)
returns (StringValue) {}
}
Run Code Online (Sandbox Code Playgroud)
但是,我从 protoc 收到一条消息,例如:
somefile.proto:30:14: "StringValue" 未定义。
我正在使用 proto3 语法。我错过了什么?
好的。
我需要:import "google/protobuf/wrappers.proto";
并且,要使用完全合格的 google.protobuf.StringValue
| 归档时间: |
|
| 查看次数: |
3309 次 |
| 最近记录: |