feat: import services and standardize Go 1.26.5
This commit is contained in:
56
apps/social/feed/internal/server/post_server.go
Normal file
56
apps/social/feed/internal/server/post_server.go
Normal file
@@ -0,0 +1,56 @@
|
||||
// Code generated by protoc-gen-slc. DO NOT EDIT.
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.apinb.com/bsm-social/feed/internal/logic/post"
|
||||
pb "git.apinb.com/bsm-social/feed/pb"
|
||||
)
|
||||
|
||||
type PostServer struct {
|
||||
pb.UnimplementedPostServer
|
||||
}
|
||||
|
||||
func NewPostServer() *PostServer {
|
||||
return &PostServer{}
|
||||
}
|
||||
|
||||
// 推文列表
|
||||
func (s *PostServer) Fetch(ctx context.Context, in *pb.FetchRequest) (*pb.PostListReply, error) {
|
||||
return post.Fetch(ctx, in)
|
||||
}
|
||||
|
||||
// 新建推文
|
||||
func (s *PostServer) Create(ctx context.Context, in *pb.PostItem) (*pb.StatusReply, error) {
|
||||
return post.Create(ctx, in)
|
||||
}
|
||||
|
||||
// 修改推文
|
||||
func (s *PostServer) Change(ctx context.Context, in *pb.PostItem) (*pb.StatusReply, error) {
|
||||
return post.Change(ctx, in)
|
||||
}
|
||||
|
||||
// 删除推文
|
||||
func (s *PostServer) Remove(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, 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.StatusReply, error) {
|
||||
return post.AddComment(ctx, in)
|
||||
}
|
||||
|
||||
// 删除评论
|
||||
func (s *PostServer) DeleteComment(ctx context.Context, in *pb.IdentRequest) (*pb.StatusReply, error) {
|
||||
return post.DeleteComment(ctx, in)
|
||||
}
|
||||
|
||||
// 计数操作
|
||||
func (s *PostServer) Action(ctx context.Context, in *pb.PostActionRequest) (*pb.StatusReply, error) {
|
||||
return post.Action(ctx, in)
|
||||
}
|
||||
Reference in New Issue
Block a user