| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- // Code generated by goctl. DO NOT EDIT.
- // Source: slowwild.proto
- package server
- import (
- "context"
- "git.banshen.xyz/huangguangrong/slow_wild_protobuff/slowwild/slowwildserver"
- "slowwild/internal/logic"
- "slowwild/internal/svc"
- )
- 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)
- }
|