Files
lone-services/product/internal/server/productserver.go
T
2026-08-07 15:41:18 +08:00

54 lines
1.3 KiB
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) Create(ctx context.Context, in *product.CreateReq) (*product.Response, error) {
l := logic.NewCreateLogic(ctx, s.svcCtx)
return l.Create(in)
}
func (s *ProductServer) Info(ctx context.Context, in *product.InfoReq) (*product.Response, error) {
l := logic.NewInfoLogic(ctx, s.svcCtx)
return l.Info(in)
}
func (s *ProductServer) Items(ctx context.Context, in *product.ItemsReq) (*product.Response, error) {
l := logic.NewItemsLogic(ctx, s.svcCtx)
return l.Items(in)
}
func (s *ProductServer) Names(ctx context.Context, in *product.NamesReq) (*product.Response, error) {
l := logic.NewNamesLogic(ctx, s.svcCtx)
return l.Names(in)
}
func (s *ProductServer) Status(ctx context.Context, in *product.StatusReq) (*product.Response, error) {
l := logic.NewStatusLogic(ctx, s.svcCtx)
return l.Status(in)
}
func (s *ProductServer) Sort(ctx context.Context, in *product.SortReq) (*product.Response, error) {
l := logic.NewSortLogic(ctx, s.svcCtx)
return l.Sort(in)
}