39 lines
871 B
Go
39 lines
871 B
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: product.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"product/internal/logic"
|
|
"product/internal/svc"
|
|
"product/product"
|
|
)
|
|
|
|
type ProductServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
product.UnimplementedProductServer
|
|
}
|
|
|
|
func NewProductServer(svcCtx *svc.ServiceContext) *ProductServer {
|
|
return &ProductServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (s *ProductServer) Add(ctx context.Context, in *product.AddReq) (*product.Response, error) {
|
|
l := logic.NewAddLogic(ctx, s.svcCtx)
|
|
return l.Add(in)
|
|
}
|
|
|
|
func (s *ProductServer) Edit(ctx context.Context, in *product.EditReq) (*product.Response, error) {
|
|
l := logic.NewEditLogic(ctx, s.svcCtx)
|
|
return l.Edit(in)
|
|
}
|
|
|
|
func (s *ProductServer) Items(ctx context.Context, in *product.ItemsReq) (*product.Response, error) {
|
|
l := logic.NewItemsLogic(ctx, s.svcCtx)
|
|
return l.Items(in)
|
|
}
|