| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- // Code generated by goctl. DO NOT EDIT.
- // Source: slowwild.proto
- package server
- import (
- "context"
- "slowwild/internal/svc"
- "git.banshen.xyz/huangguangrong/slow_wild_protobuff/slowwild/slowwildserver"
- "slowwild/internal/logic"
-
- )
- type SlowWildServerServer struct {
- svcCtx *svc.ServiceContext
- slowwildserver.UnimplementedSlowWildServerServer
- }
- func NewSlowWildServerServer(svcCtx *svc.ServiceContext) *SlowWildServerServer {
- return &SlowWildServerServer{
- svcCtx: svcCtx,
- }
- }
- // 用户登录
- func (s *SlowWildServerServer) Login(ctx context.Context, in *slowwildserver.LoginReq) (*slowwildserver.LoginAndRegisterRsp, error) {
- l := logic.NewLoginLogic(ctx, s.svcCtx)
- return l.Login(in)
- }
- // 用户注册
- func (s *SlowWildServerServer) Register(ctx context.Context, in *slowwildserver.RegisterReq) (*slowwildserver.LoginAndRegisterRsp, error) {
- l := logic.NewRegisterLogic(ctx, s.svcCtx)
- return l.Register(in)
- }
- // 获取用户信息
- func (s *SlowWildServerServer) GetUserInfo(ctx context.Context, in *slowwildserver.GetUserInfoReq) (*slowwildserver.GetUserInfoResp, error) {
- l := logic.NewGetUserInfoLogic(ctx, s.svcCtx)
- return l.GetUserInfo(in)
- }
- // 查询用户信息
- func (s *SlowWildServerServer) FindUser(ctx context.Context, in *slowwildserver.FindUserReq) (*slowwildserver.FindUserResp, error) {
- l := logic.NewFindUserLogic(ctx, s.svcCtx)
- return l.FindUser(in)
- }
- // 关注用户
- func (s *SlowWildServerServer) UserFollow(ctx context.Context, in *slowwildserver.FollowUserReq) (*slowwildserver.FollowUserRes, error) {
- l := logic.NewUserFollowLogic(ctx, s.svcCtx)
- return l.UserFollow(in)
- }
- // 取消关注用户
- func (s *SlowWildServerServer) UnUserFollow(ctx context.Context, in *slowwildserver.UnFollowUserReq) (*slowwildserver.UnFollowUserRes, error) {
- l := logic.NewUnUserFollowLogic(ctx, s.svcCtx)
- return l.UnUserFollow(in)
- }
- // 获取我得粉丝
- func (s *SlowWildServerServer) GetFans(ctx context.Context, in *slowwildserver.GetFollowingReq) (*slowwildserver.GetFollowingRes, error) {
- l := logic.NewGetFansLogic(ctx, s.svcCtx)
- return l.GetFans(in)
- }
- // 查询我的关注
- func (s *SlowWildServerServer) GetFollows(ctx context.Context, in *slowwildserver.GetFollowingReq) (*slowwildserver.GetFollowingRes, error) {
- l := logic.NewGetFollowsLogic(ctx, s.svcCtx)
- return l.GetFollows(in)
- }
- // 查询用户的详细信息
- func (s *SlowWildServerServer) GetUserProfile(ctx context.Context, in *slowwildserver.GetUserProfileReq) (*slowwildserver.GetUserProfileRes, error) {
- l := logic.NewGetUserProfileLogic(ctx, s.svcCtx)
- return l.GetUserProfile(in)
- }
- // 搜索用户名称
- func (s *SlowWildServerServer) SearchUsername(ctx context.Context, in *slowwildserver.SearchUsernameReq) (*slowwildserver.SearchUsernameRes, error) {
- l := logic.NewSearchUsernameLogic(ctx, s.svcCtx)
- return l.SearchUsername(in)
- }
- // 发布帖子
- func (s *SlowWildServerServer) CreatePost(ctx context.Context, in *slowwildserver.CreatePostReq) (*slowwildserver.CreatePostRsp, error) {
- l := logic.NewCreatePostLogic(ctx, s.svcCtx)
- return l.CreatePost(in)
- }
- // 获取话题列表
- func (s *SlowWildServerServer) GetTagList(ctx context.Context, in *slowwildserver.GetTagListReq) (*slowwildserver.GetTagListRsp, error) {
- l := logic.NewGetTagListLogic(ctx, s.svcCtx)
- return l.GetTagList(in)
- }
- // 获取话题详情
- func (s *SlowWildServerServer) GetTag(ctx context.Context, in *slowwildserver.GetTagReq) (*slowwildserver.GetTagRsp, error) {
- l := logic.NewGetTagLogic(ctx, s.svcCtx)
- return l.GetTag(in)
- }
- // 获取帖子列表
- func (s *SlowWildServerServer) GetPostList(ctx context.Context, in *slowwildserver.GetPostListReq) (*slowwildserver.GetPostListRsp, error) {
- l := logic.NewGetPostListLogic(ctx, s.svcCtx)
- return l.GetPostList(in)
- }
- // 获取帖子详情
- func (s *SlowWildServerServer) GetPost(ctx context.Context, in *slowwildserver.GetPostReq) (*slowwildserver.GetPostRsp, error) {
- l := logic.NewGetPostLogic(ctx, s.svcCtx)
- return l.GetPost(in)
- }
- // 点赞帖子
- func (s *SlowWildServerServer) PostUpvote(ctx context.Context, in *slowwildserver.PostUpvoteReq) (*slowwildserver.PostUpvoteRsp, error) {
- l := logic.NewPostUpvoteLogic(ctx, s.svcCtx)
- return l.PostUpvote(in)
- }
- // 分享帖子
- func (s *SlowWildServerServer) PostShare(ctx context.Context, in *slowwildserver.PostShareReq) (*slowwildserver.PostShareRsp, error) {
- l := logic.NewPostShareLogic(ctx, s.svcCtx)
- return l.PostShare(in)
- }
- // 收藏帖子
- func (s *SlowWildServerServer) PostCollection(ctx context.Context, in *slowwildserver.PostCollectionReq) (*slowwildserver.PostCollectionRsp, error) {
- l := logic.NewPostCollectionLogic(ctx, s.svcCtx)
- return l.PostCollection(in)
- }
- // 发布评论
- func (s *SlowWildServerServer) PostComment(ctx context.Context, in *slowwildserver.PostCommentReq) (*slowwildserver.PostCommentRsp, error) {
- l := logic.NewPostCommentLogic(ctx, s.svcCtx)
- return l.PostComment(in)
- }
- // 发布回复
- func (s *SlowWildServerServer) PostReply(ctx context.Context, in *slowwildserver.PostReplyReq) (*slowwildserver.PostReplyRsp, error) {
- l := logic.NewPostReplyLogic(ctx, s.svcCtx)
- return l.PostReply(in)
- }
- // 获取评论列表
- func (s *SlowWildServerServer) GetPostCommentList(ctx context.Context, in *slowwildserver.GetPostCommentListReq) (*slowwildserver.GetPostCommentListRsp, error) {
- l := logic.NewGetPostCommentListLogic(ctx, s.svcCtx)
- return l.GetPostCommentList(in)
- }
- // 获取回复列表
- func (s *SlowWildServerServer) GetReplyList(ctx context.Context, in *slowwildserver.GetReplyListReq) (*slowwildserver.GetReplyListRsp, error) {
- l := logic.NewGetReplyListLogic(ctx, s.svcCtx)
- return l.GetReplyList(in)
- }
- // 评论点赞
- func (s *SlowWildServerServer) PostCommentUpvote(ctx context.Context, in *slowwildserver.PostCommentUpvoteReq) (*slowwildserver.PostCommentUpvoteRsp, error) {
- l := logic.NewPostCommentUpvoteLogic(ctx, s.svcCtx)
- return l.PostCommentUpvote(in)
- }
- // 删除帖子
- func (s *SlowWildServerServer) PostDelete(ctx context.Context, in *slowwildserver.PostDeleteReq) (*slowwildserver.PostDeleteRsp, error) {
- l := logic.NewPostDeleteLogic(ctx, s.svcCtx)
- return l.PostDelete(in)
- }
- // 删除回复/评论
- func (s *SlowWildServerServer) CommentDelete(ctx context.Context, in *slowwildserver.CommentDeleteReq) (*slowwildserver.CommentDeleteRsp, error) {
- l := logic.NewCommentDeleteLogic(ctx, s.svcCtx)
- return l.CommentDelete(in)
- }
- // 获取用户发布的帖子
- func (s *SlowWildServerServer) GetUserPostList(ctx context.Context, in *slowwildserver.GetUserPostListReq) (*slowwildserver.GetUserPostListRsp, error) {
- l := logic.NewGetUserPostListLogic(ctx, s.svcCtx)
- return l.GetUserPostList(in)
- }
- // 获取用户收藏的帖子
- func (s *SlowWildServerServer) GetUserPostCollectionList(ctx context.Context, in *slowwildserver.GetUserPostCollectionListReq) (*slowwildserver.GetUserPostCollectionListRsp, error) {
- l := logic.NewGetUserPostCollectionListLogic(ctx, s.svcCtx)
- return l.GetUserPostCollectionList(in)
- }
- // 获取用户点赞过的帖子
- func (s *SlowWildServerServer) GetUserPostLikeList(ctx context.Context, in *slowwildserver.GetUserPostLikeListReq) (*slowwildserver.GetUserPostLikeListRsp, error) {
- l := logic.NewGetUserPostLikeListLogic(ctx, s.svcCtx)
- return l.GetUserPostLikeList(in)
- }
|