feat: product item
This commit is contained in:
@@ -14,14 +14,18 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
AddReq = product.AddReq
|
||||
AddResp = product.AddResp
|
||||
EditReq = product.EditReq
|
||||
EditResp = product.EditResp
|
||||
AddReq = product.AddReq
|
||||
AddResp = product.AddResp
|
||||
EditReq = product.EditReq
|
||||
EditResp = product.EditResp
|
||||
ItemsReq = product.ItemsReq
|
||||
ItemsResp = product.ItemsResp
|
||||
Item = product.Item
|
||||
|
||||
Product interface {
|
||||
Add(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*AddResp, error)
|
||||
Edit(ctx context.Context, in *EditReq, opts ...grpc.CallOption) (*EditResp, error)
|
||||
Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*ItemsResp, error)
|
||||
}
|
||||
|
||||
defaultProduct struct {
|
||||
@@ -44,3 +48,8 @@ func (m *defaultProduct) Edit(ctx context.Context, in *EditReq, opts ...grpc.Cal
|
||||
client := product.NewProductClient(m.cli.Conn())
|
||||
return client.Edit(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultProduct) Items(ctx context.Context, in *ItemsReq, opts ...grpc.CallOption) (*ItemsResp, error) {
|
||||
client := product.NewProductClient(m.cli.Conn())
|
||||
return client.Items(ctx, in, opts...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user