You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
// ================================================================================
|
|
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
|
// You can delete these comments if you wish manually maintain this interface file.
|
|
// ================================================================================
|
|
|
|
package service
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type (
|
|
ILoginLogic interface {
|
|
Login(ctx context.Context, username string, password string) (string, error)
|
|
}
|
|
ITokenLogic interface {
|
|
// ValidateToken 验证 JWT Token 的方法
|
|
ValidateToken(ctx context.Context, tokenString string) (bool, error)
|
|
}
|
|
)
|
|
|
|
var (
|
|
localLoginLogic ILoginLogic
|
|
localTokenLogic ITokenLogic
|
|
)
|
|
|
|
func LoginLogic() ILoginLogic {
|
|
if localLoginLogic == nil {
|
|
panic("implement not found for interface ILoginLogic, forgot register?")
|
|
}
|
|
return localLoginLogic
|
|
}
|
|
|
|
func RegisterLoginLogic(i ILoginLogic) {
|
|
localLoginLogic = i
|
|
}
|
|
|
|
func TokenLogic() ITokenLogic {
|
|
if localTokenLogic == nil {
|
|
panic("implement not found for interface ITokenLogic, forgot register?")
|
|
}
|
|
return localTokenLogic
|
|
}
|
|
|
|
func RegisterTokenLogic(i ITokenLogic) {
|
|
localTokenLogic = i
|
|
}
|