Documentation ¶
Index ¶
- type AwardSimple
- type FindUserInTeamReq
- type FindUserInTeamRes
- type GetProfileReq
- type GetProfileRes
- type PatchProfileReq
- type PatchProfileRes
- type SMSCodeLoginReq
- type SMSCodeLoginRes
- type SMSSendCodeReq
- type SMSSendCodeRes
- type UserLoginReq
- type UserLoginRes
- type UserService
- func (s *UserService) FindUserInTeam(ctx *rpc.Context, req *FindUserInTeamReq, res *FindUserInTeamRes) (err error)
- func (s *UserService) GetProfile(ctx *rpc.Context, req *GetProfileReq, res *GetProfileRes) (err error)
- func (s *UserService) Login(ctx context.Context, req *UserLoginReq, res *UserLoginRes) (err error)
- func (s *UserService) PatchProfile(ctx *rpc.Context, req *PatchProfileReq, res *PatchProfileRes) error
- func (s *UserService) SMSCodeLogin(ctx *rpc.Context, req *SMSCodeLoginReq, res *SMSCodeLoginRes) (err error)
- func (s *UserService) SMSSendCode(ctx *rpc.Context, req *SMSSendCodeReq, res *SMSSendCodeRes) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwardSimple ¶
组队系统中查找用户,需要信息包括:头像、真实姓名、昵称、学院、获奖情况等
type FindUserInTeamReq ¶
type FindUserInTeamReq struct {
ProjectID uint
}
type FindUserInTeamRes ¶
type FindUserInTeamRes struct { AvatarURI string RealName string NickName string School string //通过Student AwardSimples []AwardSimple }
type GetProfileReq ¶
type GetProfileReq struct { }
type PatchProfileReq ¶
type PatchProfileRes ¶
type PatchProfileRes struct {
Completed bool
}
type SMSCodeLoginReq ¶
type SMSSendCodeReq ¶
type SMSSendCodeReq struct {
PhoneNumber string `validate:"required,e164"` // like +86xxxxxx
}
type SMSSendCodeRes ¶
type SMSSendCodeRes struct {
Session string
}
type UserLoginReq ¶
type UserLoginRes ¶
type UserLoginRes struct {
Token string
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(db *gorm.DB) *UserService
func (*UserService) FindUserInTeam ¶
func (s *UserService) FindUserInTeam(ctx *rpc.Context, req *FindUserInTeamReq, res *FindUserInTeamRes) (err error)
func (*UserService) GetProfile ¶
func (s *UserService) GetProfile(ctx *rpc.Context, req *GetProfileReq, res *GetProfileRes) (err error)
func (*UserService) Login ¶
func (s *UserService) Login(ctx context.Context, req *UserLoginReq, res *UserLoginRes) (err error)
用户名、密码组合登陆
func (*UserService) PatchProfile ¶
func (s *UserService) PatchProfile(ctx *rpc.Context, req *PatchProfileReq, res *PatchProfileRes) error
func (*UserService) SMSCodeLogin ¶
func (s *UserService) SMSCodeLogin(ctx *rpc.Context, req *SMSCodeLoginReq, res *SMSCodeLoginRes) (err error)
手机号验证码登陆
func (*UserService) SMSSendCode ¶
func (s *UserService) SMSSendCode(ctx *rpc.Context, req *SMSSendCodeReq, res *SMSSendCodeRes) (err error)
手机号验证码登陆/发送验证码
Click to show internal directories.
Click to hide internal directories.