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