23 lines
499 B
Go
23 lines
499 B
Go
![]() |
package account
|
||
|
|
||
|
import (
|
||
|
"SciencesServer/app/service"
|
||
|
"SciencesServer/config"
|
||
|
"SciencesServer/utils"
|
||
|
)
|
||
|
|
||
|
type Logout struct{ *service.SessionEnterprise }
|
||
|
|
||
|
type LogoutHandle func(*service.SessionEnterprise) *Logout
|
||
|
|
||
|
func (c *Logout) Launch() error {
|
||
|
service.Publish(config.EventForRedisHashDestroy, config.RedisKeyForAccount, utils.UintToString(c.UID))
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func NewLogout() LogoutHandle {
|
||
|
return func(enterprise *service.SessionEnterprise) *Logout {
|
||
|
return &Logout{enterprise}
|
||
|
}
|
||
|
}
|