商品rpc数据格式及调用方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
686 B

syntax = "proto3";
package productrpc;
// 使用key查询
message GetRequest {
string site_id = 1;
string dbname = 2;
string id = 3;
string field = 4;
}
message GetUuidRequest {
string site_id = 1;
string dbname = 2;
string id = 3;
string field = 4;
}
// 使用key查询响应结构
message GetResponse {
bytes value = 1;
}
// rpc方法
service ProductService {
rpc Get (GetRequest) returns (GetResponse); // 使用id查询
rpc GetByUuid (GetUuidRequest) returns (GetResponse); // 使用uuid查询
rpc GetSku (GetRequest) returns (GetResponse); // 使用id查询
rpc GetSkuByUuid (GetUuidRequest) returns (GetResponse); // 使用uuid查询
}