// Code generated by goctl. DO NOT EDIT. // Source: tweeting.proto package server import ( "context" "app-cloudep-feed-service/gen_result/pb/tweeting" "app-cloudep-feed-service/internal/logic/postservice" "app-cloudep-feed-service/internal/svc" ) type PostServiceServer struct { svcCtx *svc.ServiceContext tweeting.UnimplementedPostServiceServer } func NewPostServiceServer(svcCtx *svc.ServiceContext) *PostServiceServer { return &PostServiceServer{ svcCtx: svcCtx, } } // NewPost 新增貼文 func (s *PostServiceServer) NewPost(ctx context.Context, in *tweeting.NewPostReq) (*tweeting.PostResp, error) { l := postservicelogic.NewNewPostLogic(ctx, s.svcCtx) return l.NewPost(in) } // DeletePost 刪除貼文 func (s *PostServiceServer) DeletePost(ctx context.Context, in *tweeting.DeletePostsReq) (*tweeting.OKResp, error) { l := postservicelogic.NewDeletePostLogic(ctx, s.svcCtx) return l.DeletePost(in) } // UpdatePost 更新貼文 func (s *PostServiceServer) UpdatePost(ctx context.Context, in *tweeting.UpdatePostReq) (*tweeting.OKResp, error) { l := postservicelogic.NewUpdatePostLogic(ctx, s.svcCtx) return l.UpdatePost(in) } // ListPosts 查詢貼文 func (s *PostServiceServer) ListPosts(ctx context.Context, in *tweeting.QueryPostsReq) (*tweeting.ListPostsResp, error) { l := postservicelogic.NewListPostsLogic(ctx, s.svcCtx) return l.ListPosts(in) } // Like 點讚/取消讚 貼文 func (s *PostServiceServer) Like(ctx context.Context, in *tweeting.LikeReq) (*tweeting.OKResp, error) { l := postservicelogic.NewLikeLogic(ctx, s.svcCtx) return l.Like(in) } // GetLikeStatus 取得讚/不讚狀態 func (s *PostServiceServer) GetLikeStatus(ctx context.Context, in *tweeting.LikeReq) (*tweeting.OKResp, error) { l := postservicelogic.NewGetLikeStatusLogic(ctx, s.svcCtx) return l.GetLikeStatus(in) } // LikeList 取得讚/不讚列表 func (s *PostServiceServer) LikeList(ctx context.Context, in *tweeting.LikeListReq) (*tweeting.LikeListResp, error) { l := postservicelogic.NewLikeListLogic(ctx, s.svcCtx) return l.LikeList(in) } // CountLike 取得讚/不讚數量 func (s *PostServiceServer) CountLike(ctx context.Context, in *tweeting.LikeCountReq) (*tweeting.LikeCountResp, error) { l := postservicelogic.NewCountLikeLogic(ctx, s.svcCtx) return l.CountLike(in) }