Documentation
¶
Index ¶
- type UserService
- func (s *UserService) CheckToken(in pb.CheckTokenRequest) (pb.CheckTokenResponse, error)
- func (s *UserService) GetProfile(in pb.GetProfileRequest) (pb.GetProfileResponse, error)
- func (s *UserService) Login(in pb.LoginRequest) (pb.LoginResponse, error)
- func (s *UserService) Logout(in pb.LogoutRequest) (pb.LogoutResponse, error)
- func (s *UserService) Register(in pb.RegisterRequest) (pb.RegisterResponse, error)
- func (s *UserService) UpdateProfile(in pb.UpdateProfileRequest) (pb.UpdateProfileResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
UserService 用户业务
func NewUserService ¶
func NewUserService(userMapper *mapper.UserMapper, userCache *cache.UserCache) *UserService
NewUserService 创建用户业务操作
func (*UserService) CheckToken ¶
func (s *UserService) CheckToken(in pb.CheckTokenRequest) (pb.CheckTokenResponse, error)
CheckToken 检查token
func (*UserService) GetProfile ¶
func (s *UserService) GetProfile(in pb.GetProfileRequest) (pb.GetProfileResponse, error)
GetProfile 获取信息 TODO 多节点,分布式锁
func (*UserService) Login ¶
func (s *UserService) Login(in pb.LoginRequest) (pb.LoginResponse, error)
Login 用户登录
func (*UserService) Logout ¶
func (s *UserService) Logout(in pb.LogoutRequest) (pb.LogoutResponse, error)
Logout 退出登录
func (*UserService) Register ¶
func (s *UserService) Register(in pb.RegisterRequest) (pb.RegisterResponse, error)
Register 用户注册
func (*UserService) UpdateProfile ¶
func (s *UserService) UpdateProfile(in pb.UpdateProfileRequest) (pb.UpdateProfileResponse, error)
UpdateProfile 更新信息 更新字段,延时2S双删
Click to show internal directories.
Click to hide internal directories.