2026-08-09 10:43:45 +08:00
|
|
|
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
|
|
import (
|
2026-08-09 12:41:08 +08:00
|
|
|
"bsm/full/module/base/cms/internal/logic/post"
|
|
|
|
|
pb "bsm/full/module/base/cms/pb"
|
2026-08-09 20:14:57 +08:00
|
|
|
"context"
|
2026-08-09 10:43:45 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type PostServer struct {
|
|
|
|
|
pb.UnimplementedPostServer
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewPostServer() *PostServer {
|
|
|
|
|
return &PostServer{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文章列表
|
|
|
|
|
func (s *PostServer) Fetch(ctx context.Context, in *pb.PostListRequest) (*pb.PostListReply, error) {
|
|
|
|
|
return post.Fetch(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取文章详情 By Identity
|
|
|
|
|
func (s *PostServer) GetByIdentity(ctx context.Context, in *pb.GetPostRequest) (*pb.PostItem, error) {
|
|
|
|
|
return post.GetByIdentity(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取文章详情 By Key
|
|
|
|
|
func (s *PostServer) GetByKey(ctx context.Context, in *pb.GetPostByKeyRequest) (*pb.PostItem, error) {
|
|
|
|
|
return post.GetByKey(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 搜索文章
|
2026-08-09 20:14:57 +08:00
|
|
|
func (s *PostServer) Search(ctx context.Context, in *pb.CmsSearchRequest) (*pb.PostListReply, error) {
|
2026-08-09 10:43:45 +08:00
|
|
|
return post.Search(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 发布文章
|
|
|
|
|
func (s *PostServer) Create(ctx context.Context, in *pb.PostItem) (*pb.StatusReply, error) {
|
|
|
|
|
return post.Create(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改文章
|
|
|
|
|
func (s *PostServer) Modify(ctx context.Context, in *pb.PostItem) (*pb.StatusReply, error) {
|
|
|
|
|
return post.Modify(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除文章
|
|
|
|
|
func (s *PostServer) Delete(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.Delete(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文章点赞处理
|
|
|
|
|
func (s *PostServer) IncrPostLike(ctx context.Context, in *pb.PostOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.IncrPostLike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文章点赞取消处理
|
|
|
|
|
func (s *PostServer) DescPostLike(ctx context.Context, in *pb.PostOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.DescPostLike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文章点踩处理
|
|
|
|
|
func (s *PostServer) IncrPostUnlike(ctx context.Context, in *pb.PostOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.IncrPostUnlike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 文章点踩取消处理
|
|
|
|
|
func (s *PostServer) DescPostUnlike(ctx context.Context, in *pb.PostOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.DescPostUnlike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评论列表
|
|
|
|
|
func (s *PostServer) CommentList(ctx context.Context, in *pb.CommentListRequest) (*pb.CommentListResponse, error) {
|
|
|
|
|
return post.CommentList(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 发布评论
|
|
|
|
|
func (s *PostServer) AddComment(ctx context.Context, in *pb.CommentItem) (*pb.StatusReply, error) {
|
|
|
|
|
return post.AddComment(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 修改评论
|
|
|
|
|
func (s *PostServer) ModifyComment(ctx context.Context, in *pb.CommentItem) (*pb.StatusReply, error) {
|
|
|
|
|
return post.ModifyComment(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 删除评论
|
|
|
|
|
func (s *PostServer) DeleteComment(ctx context.Context, in *pb.DeleteCommentRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.DeleteComment(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评论点赞处理
|
|
|
|
|
func (s *PostServer) IncrCommentLike(ctx context.Context, in *pb.CommentOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.IncrCommentLike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评论点赞取消处理
|
|
|
|
|
func (s *PostServer) DescCommentLike(ctx context.Context, in *pb.CommentOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.DescCommentLike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评论点踩处理
|
|
|
|
|
func (s *PostServer) IncrCommentUnlike(ctx context.Context, in *pb.CommentOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.IncrCommentUnlike(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评论点踩取消处理
|
|
|
|
|
func (s *PostServer) DescCommentUnlike(ctx context.Context, in *pb.CommentOpIdentityRequest) (*pb.StatusReply, error) {
|
|
|
|
|
return post.DescCommentUnlike(ctx, in)
|
|
|
|
|
}
|