Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGenerateTokenError = xerr.NewErrMsg("生成token失败")
View Source
var ErrLoginError = xerr.NewErrMsg("账号或密码错误")
Functions ¶
This section is empty.
Types ¶
type GenerateTokenLogic ¶
func NewGenerateTokenLogic ¶
func NewGenerateTokenLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GenerateTokenLogic
func (*GenerateTokenLogic) GenerateToken ¶
func (l *GenerateTokenLogic) GenerateToken(in *pb.GenerateTokenReq) (*pb.GenerateTokenResp, error)
参数: 用户id(int64) 返回值: 令牌内容(string), 过期时间(int64), 刷新时间(int64)
type GetUserAuthByAuthKeyLogic ¶
func NewGetUserAuthByAuthKeyLogic ¶
func NewGetUserAuthByAuthKeyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserAuthByAuthKeyLogic
func (*GetUserAuthByAuthKeyLogic) GetUserAuthByAuthKey ¶
func (l *GetUserAuthByAuthKeyLogic) GetUserAuthByAuthKey(in *pb.GetUserAuthByAuthKeyReq) (*pb.GetUserAuthByAuthKeyResp, error)
type GetUserAuthByUserIdLogic ¶
func NewGetUserAuthByUserIdLogic ¶
func NewGetUserAuthByUserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserAuthByUserIdLogic
func (*GetUserAuthByUserIdLogic) GetUserAuthByUserId ¶
func (l *GetUserAuthByUserIdLogic) GetUserAuthByUserId(in *pb.GetUserAuthByUserIdReq) (*pb.GetUserAuthyUserIdResp, error)
type GetUserInfoLogic ¶
func NewGetUserInfoLogic ¶
func NewGetUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserInfoLogic
func (*GetUserInfoLogic) GetUserInfo ¶
func (l *GetUserInfoLogic) GetUserInfo(in *pb.GetUserInfoReq) (*pb.GetUserInfoResp, error)
参数: 用户id(int64) 返回值: 用户信息(User)
type LoginLogic ¶
func NewLoginLogic ¶
func NewLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LoginLogic
func (*LoginLogic) EmailLogin ¶
func (l *LoginLogic) EmailLogin(email, password string) (int64, error)
EmailLogin 参数: 邮箱号(string), 登录密码(string)
返回: 用户id(int64), 错误信息(error)
type LogoutLogic ¶
func NewLogoutLogic ¶
func NewLogoutLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LogoutLogic
func (*LogoutLogic) Logout ¶
func (l *LogoutLogic) Logout(in *pb.LogoutReq) (*pb.LogoutResp, error)
type RealNameAuthenticationLogic ¶
func NewRealNameAuthenticationLogic ¶
func NewRealNameAuthenticationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RealNameAuthenticationLogic
func (*RealNameAuthenticationLogic) RealNameAuthentication ¶
func (l *RealNameAuthenticationLogic) RealNameAuthentication(in *pb.RealNameAuthenticationReq) (*pb.RealNameAuthenticationResp, error)
type RegisterLogic ¶
func NewRegisterLogic ¶
func NewRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RegisterLogic
func (*RegisterLogic) Register ¶
func (l *RegisterLogic) Register(in *pb.RegisterReq) (*pb.RegisterResp, error)
参数: 用户名, 密码, 邮箱,验证码, 登录类型 返回值: 令牌内容(string),过期时间(int64), 刷新时间(int64)
type SendEmailLogic ¶
func NewSendEmailLogic ¶
func NewSendEmailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SendEmailLogic
func (*SendEmailLogic) SendEmail ¶
func (l *SendEmailLogic) SendEmail(in *pb.SendEmailReq) (*pb.SendEmailResp, error)
type UpdateUserInfoLogic ¶
func NewUpdateUserInfoLogic ¶
func NewUpdateUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserInfoLogic
func (*UpdateUserInfoLogic) UpdateUserInfo ¶
func (l *UpdateUserInfoLogic) UpdateUserInfo(in *pb.UpdateUserInfoReq) (*pb.UpdateUserInfoResp, error)
参数: 用户id(int64), 修改类型(string),字段1(string),字段2(string),字段3(int64),字段4(float64), 返回值: 空结构体, 错误信息(error) tips: 修改类型包括PassWord,NickName,Sex,Memory,Flow,Money,Star,AllFlow,AllMemory 如果需要修改密码/用户名,将密码/用户名写在字段1 如果需要修改性别,将性别写在字段3 如果需要修改内存/流量/余额,将内存/流量/余额写在字段4 All开头代表给所有的人都增加
Click to show internal directories.
Click to hide internal directories.