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

42 lines
963 B
Go
Raw Normal View History

2025-03-12 14:05:38 +00:00
// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package product
import (
2025-04-08 00:51:58 +00:00
"context"
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
2025-03-12 14:05:38 +00:00
"github.com/zeromicro/go-zero/zrpc"
2025-04-08 00:51:58 +00:00
"google.golang.org/grpc"
2025-03-12 14:05:38 +00:00
)
type (
2025-04-08 00:51:58 +00:00
CreateCategoryReq = product.CreateCategoryReq
NoneReq = product.NoneReq
OKResp = product.OKResp
2025-03-12 14:05:38 +00:00
Product interface {
2025-04-08 00:51:58 +00:00
// CreateCategory 建立 product 分類
CreateCategory(ctx context.Context, in *CreateCategoryReq, opts ...grpc.CallOption) (*OKResp, error)
2025-03-12 14:05:38 +00:00
}
defaultProduct struct {
cli zrpc.Client
}
)
func NewProduct(cli zrpc.Client) Product {
return &defaultProduct{
cli: cli,
}
}
2025-04-08 00:51:58 +00:00
// 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...)
}