Documentation ¶
Index ¶
- func CheckLogin(tokenValue string) (string, error)
- func GetSessionValue(tokenValue string, key string) (any, error)
- func Login(model model.LoginModel) (string, error)
- func Logout(token string) error
- func LogoutByLoginId(loginId any) error
- func RegisterListener(listener Listener)
- func RenewTimeout(loginId any, token string) error
- func SetSessionValue(tokenValue string, key string, value any) error
- type Listener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckLogin ¶
func LogoutByLoginId ¶
func RegisterListener ¶
func RegisterListener(listener Listener)
func RenewTimeout ¶
Types ¶
type Listener ¶
type Listener interface { // DoLogin 每次登录时触发 DoLogin(loginId any, tokenValue string, loginModel model.LoginModel) // DoLogout 每次注销时触发 DoLogout(tokenValue string) // DoLogoutByLoginId 每次注销时触发 DoLogoutByLoginId(loginId any) //DoRenewTimeout 每次Token续期时触发 DoRenewTimeout(tokenValue string, loginId any, timout int64) }
Click to show internal directories.
Click to hide internal directories.