21
API/api.proto
Normal file
21
API/api.proto
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user