45 lines
1.3 KiB
Go
45 lines
1.3 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: search.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"juwan-backend/app/search/rpc/internal/logic"
|
|
"juwan-backend/app/search/rpc/internal/svc"
|
|
"juwan-backend/app/search/rpc/pb"
|
|
)
|
|
|
|
type SearchServiceServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
pb.UnimplementedSearchServiceServer
|
|
}
|
|
|
|
func NewSearchServiceServer(svcCtx *svc.ServiceContext) *SearchServiceServer {
|
|
return &SearchServiceServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
func (s *SearchServiceServer) AddFavorites(ctx context.Context, in *pb.AddFavoritesReq) (*pb.AddFavoritesResp, error) {
|
|
l := logic.NewAddFavoritesLogic(ctx, s.svcCtx)
|
|
return l.AddFavorites(in)
|
|
}
|
|
|
|
func (s *SearchServiceServer) DelFavorites(ctx context.Context, in *pb.DelFavoritesReq) (*pb.DelFavoritesResp, error) {
|
|
l := logic.NewDelFavoritesLogic(ctx, s.svcCtx)
|
|
return l.DelFavorites(in)
|
|
}
|
|
|
|
func (s *SearchServiceServer) GetFavoritesById(ctx context.Context, in *pb.GetFavoritesByIdReq) (*pb.GetFavoritesByIdResp, error) {
|
|
l := logic.NewGetFavoritesByIdLogic(ctx, s.svcCtx)
|
|
return l.GetFavoritesById(in)
|
|
}
|
|
|
|
func (s *SearchServiceServer) SearchFavorites(ctx context.Context, in *pb.SearchFavoritesReq) (*pb.SearchFavoritesResp, error) {
|
|
l := logic.NewSearchFavoritesLogic(ctx, s.svcCtx)
|
|
return l.SearchFavorites(in)
|
|
}
|