51 lines
1.5 KiB
Go
51 lines
1.5 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: review.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"juwan-backend/app/review/rpc/internal/logic"
|
|
"juwan-backend/app/review/rpc/internal/svc"
|
|
"juwan-backend/app/review/rpc/pb"
|
|
)
|
|
|
|
type ReviewServiceServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
pb.UnimplementedReviewServiceServer
|
|
}
|
|
|
|
func NewReviewServiceServer(svcCtx *svc.ServiceContext) *ReviewServiceServer {
|
|
return &ReviewServiceServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// -----------------------reviews-----------------------
|
|
func (s *ReviewServiceServer) AddReviews(ctx context.Context, in *pb.AddReviewsReq) (*pb.AddReviewsResp, error) {
|
|
l := logic.NewAddReviewsLogic(ctx, s.svcCtx)
|
|
return l.AddReviews(in)
|
|
}
|
|
|
|
func (s *ReviewServiceServer) UpdateReviews(ctx context.Context, in *pb.UpdateReviewsReq) (*pb.UpdateReviewsResp, error) {
|
|
l := logic.NewUpdateReviewsLogic(ctx, s.svcCtx)
|
|
return l.UpdateReviews(in)
|
|
}
|
|
|
|
func (s *ReviewServiceServer) DelReviews(ctx context.Context, in *pb.DelReviewsReq) (*pb.DelReviewsResp, error) {
|
|
l := logic.NewDelReviewsLogic(ctx, s.svcCtx)
|
|
return l.DelReviews(in)
|
|
}
|
|
|
|
func (s *ReviewServiceServer) GetReviewsById(ctx context.Context, in *pb.GetReviewsByIdReq) (*pb.GetReviewsByIdResp, error) {
|
|
l := logic.NewGetReviewsByIdLogic(ctx, s.svcCtx)
|
|
return l.GetReviewsById(in)
|
|
}
|
|
|
|
func (s *ReviewServiceServer) SearchReviews(ctx context.Context, in *pb.SearchReviewsReq) (*pb.SearchReviewsResp, error) {
|
|
l := logic.NewSearchReviewsLogic(ctx, s.svcCtx)
|
|
return l.SearchReviews(in)
|
|
}
|