57 lines
1.5 KiB
Go
57 lines
1.5 KiB
Go
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
|
package server
|
|
|
|
import (
|
|
"bsm/full/module/social/feed/internal/logic/post"
|
|
pb "bsm/full/module/social/feed/pb"
|
|
"context"
|
|
)
|
|
|
|
type PostServer struct {
|
|
pb.UnimplementedPostServer
|
|
}
|
|
|
|
func NewPostServer() *PostServer {
|
|
return &PostServer{}
|
|
}
|
|
|
|
// 推文列表
|
|
func (s *PostServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.FeedPostListReply, error) {
|
|
return post.Fetch(ctx, in)
|
|
}
|
|
|
|
// 新建推文
|
|
func (s *PostServer) Create(ctx context.Context, in *pb.FeedPostItem) (*pb.DataStatusReply, error) {
|
|
return post.Create(ctx, in)
|
|
}
|
|
|
|
// 修改推文
|
|
func (s *PostServer) Change(ctx context.Context, in *pb.FeedPostItem) (*pb.DataStatusReply, error) {
|
|
return post.Change(ctx, in)
|
|
}
|
|
|
|
// 删除推文
|
|
func (s *PostServer) Remove(ctx context.Context, in *pb.IdentRequest) (*pb.DataStatusReply, error) {
|
|
return post.Remove(ctx, in)
|
|
}
|
|
|
|
// 评论列表
|
|
func (s *PostServer) CommentList(ctx context.Context, in *pb.FetchRequest) (*pb.CommentListReply, error) {
|
|
return post.CommentList(ctx, in)
|
|
}
|
|
|
|
// 新建评论
|
|
func (s *PostServer) AddComment(ctx context.Context, in *pb.CommentItem) (*pb.DataStatusReply, error) {
|
|
return post.AddComment(ctx, in)
|
|
}
|
|
|
|
// 删除评论
|
|
func (s *PostServer) DeleteComment(ctx context.Context, in *pb.IdentRequest) (*pb.DataStatusReply, error) {
|
|
return post.DeleteComment(ctx, in)
|
|
}
|
|
|
|
// 计数操作
|
|
func (s *PostServer) Action(ctx context.Context, in *pb.PostActionRequest) (*pb.DataStatusReply, error) {
|
|
return post.Action(ctx, in)
|
|
}
|