app-cloudep-product-service/internal/server/product/product_server.go

31 lines
795 B
Go

// Code generated by goctl. DO NOT EDIT.
// goctl 1.8.1
// Source: product.proto
package server
import (
"context"
"code.30cm.net/digimon/app-cloudep-product-service/gen_result/pb/product"
"code.30cm.net/digimon/app-cloudep-product-service/internal/logic/product"
"code.30cm.net/digimon/app-cloudep-product-service/internal/svc"
)
type ProductServer struct {
svcCtx *svc.ServiceContext
product.UnimplementedProductServer
}
func NewProductServer(svcCtx *svc.ServiceContext) *ProductServer {
return &ProductServer{
svcCtx: svcCtx,
}
}
// CreateCategory 建立 product 分類
func (s *ProductServer) CreateCategory(ctx context.Context, in *product.CreateCategoryReq) (*product.OKResp, error) {
l := productlogic.NewCreateCategoryLogic(ctx, s.svcCtx)
return l.CreateCategory(in)
}