22 lines
307 B
Protocol Buffer
22 lines
307 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
// 定义消息结构
|
|
message Request {
|
|
string code = 1;
|
|
string str1 = 2;
|
|
string str2 = 3;
|
|
int32 int_value = 4;
|
|
}
|
|
|
|
message Response {
|
|
bool success = 1;
|
|
string message = 2;
|
|
}
|
|
|
|
// 定义服务
|
|
service ApiService {
|
|
rpc CallApi (Request) returns (Response);
|
|
}
|