尝试登录逻辑
This commit is contained in:
25
srv/internal/user/service.go
Normal file
25
srv/internal/user/service.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"Crimson-Gatekeeper/internal/model"
|
||||
"Crimson-Gatekeeper/internal/query"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// loginInfo 储存用户的登录状态
|
||||
type loginInfo struct {
|
||||
// user 信息指针
|
||||
user *model.User
|
||||
// invalidation 失效时间,此事件之后,该数据应该失效且被删除
|
||||
invalidation time.Time
|
||||
}
|
||||
|
||||
var loginIn = sync.Map{}
|
||||
|
||||
type Service struct {
|
||||
c *query.Query
|
||||
}
|
||||
|
||||
func (s *Service) login(user *model.User) error {
|
||||
}
|
||||
Reference in New Issue
Block a user