package bll import ( "context" "net/http" "yx-dataset-server/app/schema" ) // ILogin Login业务逻辑接口 type ILogin interface { // GetCaptchaID 获取图形验证码信息 GetCaptchaID(ctx context.Context, length int) (*schema.LoginCaptcha, error) // ResCaptcha 生成并响应图形验证码 ResCaptcha(ctx context.Context, w http.ResponseWriter, captchaID string, width, height int) error // GenerateToken 生成令牌 GenerateToken(ctx context.Context, userID string) (*schema.LoginTokenInfo, error) // DestroyToken 销毁令牌 DestroyToken(ctx context.Context, tokenString string) error // RefreshToken 刷新令牌 RefreshToken(ctx context.Context) (*schema.LoginTokenInfo, error) // Verify 登录验证 Verify(ctx context.Context, userName, password string) (*schema.User, error) // GetUserInfo 获取当前用户登录信息 GetUserInfo(ctx context.Context) (*schema.UserLoginInfo, error) // UpdatePassword 更新当前用户登录密码 UpdatePassword(ctx context.Context, params schema.UpdatePasswordParam) error // Unsubscribe 用户注销 Unsubscribe(ctx context.Context, userId, tokenStr string) error // LoginBySms 通过短信验证码登录 LoginBySms(ctx context.Context, params schema.SmsLoginParam) error }