PersonalMain-Golang/internal/service/tokenService.go

21 lines
383 B
Go
Raw Normal View History

2023-12-25 02:15:59 +08:00
package service
import (
"PersonalMain/internal/logic"
"PersonalMain/internal/model/do"
"github.com/gogf/gf/v2/net/ghttp"
)
func NewTokenService() TokenService {
return &logic.DefaultTokenImpl{}
}
// TokenService
//
// Token 服务接口
type TokenService interface {
CreateToken() *do.TokenDO
GetToken(req *ghttp.Request) *do.TokenDO
VerifyToken(token *do.TokenDO) bool
}