Browse Source

增加sku查询方法

master v0.2.0
guzeng 3 years ago
parent
commit
ccd5780795
2 changed files with 10 additions and 0 deletions
  1. +8
    -0
      product.pb.go
  2. +2
    -0
      product.proto

+ 8
- 0
product.pb.go View File

@ -101,6 +101,8 @@ func init() {
type ProductService interface { type ProductService interface {
Get(in *GetRequest, out *GetResponse) error Get(in *GetRequest, out *GetResponse) error
GetByUuid(in *GetUuidRequest, 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 // 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 { func (c *ProductServiceClient) GetByUuid(in *GetUuidRequest, out *GetResponse) error {
return c.Call("ProductService.GetByUuid", in, out) 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. // DialProductService connects to an ProductService at the specified network address.
func DialProductService(network, addr string) (*ProductServiceClient, *rpc.Client, error) { func DialProductService(network, addr string) (*ProductServiceClient, *rpc.Client, error) {


+ 2
- 0
product.proto View File

@ -22,4 +22,6 @@ message GetResponse {
service ProductService { service ProductService {
rpc Get (GetRequest) returns (GetResponse); // 使id查询 rpc Get (GetRequest) returns (GetResponse); // 使id查询
rpc GetByUuid (GetUuidRequest) returns (GetResponse); // 使uuid查询 rpc GetByUuid (GetUuidRequest) returns (GetResponse); // 使uuid查询
rpc GetSku (GetRequest) returns (GetResponse); // 使id查询
rpc GetSkuByUuid (GetUuidRequest) returns (GetResponse); // 使uuid查询
} }

Loading…
Cancel
Save