From ccd57807954a91dd20115bb92658bfaffbaa7b13 Mon Sep 17 00:00:00 2001 From: guzeng Date: Tue, 17 Aug 2021 18:41:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0sku=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- product.pb.go | 8 ++++++++ product.proto | 2 ++ 2 files changed, 10 insertions(+) diff --git a/product.pb.go b/product.pb.go index 04f4d32..da1979e 100644 --- a/product.pb.go +++ b/product.pb.go @@ -101,6 +101,8 @@ func init() { type ProductService interface { Get(in *GetRequest, out *GetResponse) error GetByUuid(in *GetUuidRequest, out *GetResponse) error + GetSku(in *GetRequest, out *GetResponse) error + GetSkuByUuid(in *GetUuidRequest, out *GetResponse) error } // AcceptProductServiceClient accepts connections on the listener and serves requests @@ -178,6 +180,12 @@ func (c *ProductServiceClient) Get(in *GetRequest, out *GetResponse) error { func (c *ProductServiceClient) GetByUuid(in *GetUuidRequest, out *GetResponse) error { return c.Call("ProductService.GetByUuid", in, out) } +func (c *ProductServiceClient) GetSku(in *GetRequest, out *GetResponse) error { + return c.Call("ProductService.GetSku", in, out) +} +func (c *ProductServiceClient) GetSkuByUuid(in *GetUuidRequest, out *GetResponse) error { + return c.Call("ProductService.GetSkuByUuid", in, out) +} // DialProductService connects to an ProductService at the specified network address. func DialProductService(network, addr string) (*ProductServiceClient, *rpc.Client, error) { diff --git a/product.proto b/product.proto index 973911f..6d02c54 100644 --- a/product.proto +++ b/product.proto @@ -22,4 +22,6 @@ message GetResponse { 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查询 } \ No newline at end of file