|
|
- 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 uuid = 3;
- string field = 4;
- }
-
- // 使用key查询响应结构
- message GetResponse {
- bytes value = 1;
- }
-
-
- // 配置信息请求结构
- message Request {
- string data = 1;
- string time = 2;
- string sign = 3;
- }
-
- // 配置信息响应结构
- message Response {
- string data = 1;
- string time = 2;
- string sign = 3;
- }
-
- // 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查询
- rpc GetActivity(Request) returns (Response); //查询商品所在的活动
- }
|