logic

package
v0.0.0-...-d345bf7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

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

type GenerateTokenLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type GetUserAuthByAuthKeyLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetUserAuthByAuthKeyLogic

func NewGetUserAuthByAuthKeyLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserAuthByAuthKeyLogic

func (*GetUserAuthByAuthKeyLogic) GetUserAuthByAuthKey

type GetUserAuthByUserIdLogic

type GetUserAuthByUserIdLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetUserAuthByUserIdLogic

func NewGetUserAuthByUserIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetUserAuthByUserIdLogic

func (*GetUserAuthByUserIdLogic) GetUserAuthByUserId

type GetUserInfoLogic

type GetUserInfoLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type LoginLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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)

func (*LoginLogic) Login

func (l *LoginLogic) Login(in *pb.LoginReq) (*pb.LoginResp, error)

参数: 登录类型(string), 登录Key(string), 登录密码(string)

返回值: 令牌内容(string),过期时间(int64), 刷新时间(int64)

type LogoutLogic

type LogoutLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type RealNameAuthenticationLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewRealNameAuthenticationLogic

func NewRealNameAuthenticationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RealNameAuthenticationLogic

func (*RealNameAuthenticationLogic) RealNameAuthentication

type RegisterLogic

type RegisterLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type SendEmailLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

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

type UpdateUserInfoLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewUpdateUserInfoLogic

func NewUpdateUserInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateUserInfoLogic

func (*UpdateUserInfoLogic) UpdateUserInfo

参数: 用户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开头代表给所有的人都增加

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL