app-cloudep-product-service/client/product/product.go

42 lines
963 B
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package product
import (
"context"
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
"github.com/zeromicro/go-zero/zrpc"
"google.golang.org/grpc"
)
type (
CreateCategoryReq = product.CreateCategoryReq
NoneReq = product.NoneReq
OKResp = product.OKResp
Product interface {
// CreateCategory 建立 product 分類
CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*OKResp, error)
}
defaultProduct struct {
cli zrpc.Client
}
)
func NewProduct(cli zrpc.Client) Product {
return &defaultProduct{
cli: cli,
}
}
// CreateCategory 建立 product 分類
func (m *defaultProduct) CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*OKResp, error) {
client := product.NewProductClient(m.cli.Conn())
return client.CreateCategory(ctx, in, opts...)
}