Documentation
¶
Index ¶
- Variables
- type InstalledUserStatus
- type Service
- type UserStatus
- func (s *UserStatus) InstallProcess(ctx context.Context, system herbsystem.System, ...)
- func (s *UserStatus) ModuleName() string
- func (s *UserStatus) MustCheckSession(ctx context.Context, session *usersystem.Session) bool
- func (s *UserStatus) MustIsUserAvaliable(id string) bool
- func (s *UserStatus) StartService() error
- func (s *UserStatus) StopService() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ModuleName = "status"
Functions ¶
This section is empty.
Types ¶
type InstalledUserStatus ¶
type InstalledUserStatus struct {
*UserStatus
UserSystem *usersystem.UserSystem
}
func MustNewAndInstallTo ¶
func MustNewAndInstallTo(s *usersystem.UserSystem) *InstalledUserStatus
func NewInstalledUserStatus ¶
func NewInstalledUserStatus() *InstalledUserStatus
type Service ¶
type Service interface {
//MustLoadStatus load user status
//Return uid status and exists
//Status.StatusUnkown and false will be retruned if user not exists
MustLoadStatus(string) (status.Status, bool)
//MustUpdateStatus update user status.
MustUpdateStatus(string, status.Status)
//MustCreateStatus create user status.
MustCreateStatus(string)
//MustRemoveStatus remove user status
MustRemoveStatus(string)
//MustRemoveStatus list user by status
MustListUsersByStatus(last string, limit int, reverse bool, statuses ...status.Status) []string
status.Service
//Start start service
Start() error
//Stop stop service
Stop() error
//Purge purge user data cache
Purge(string) error
}
type UserStatus ¶
type UserStatus struct {
herbsystem.NopModule
Service
}
func MustGetModule ¶
func MustGetModule(s *usersystem.UserSystem) *UserStatus
func New ¶
func New() *UserStatus
func (*UserStatus) InstallProcess ¶
func (s *UserStatus) InstallProcess(ctx context.Context, system herbsystem.System, next func(context.Context, herbsystem.System))
func (*UserStatus) ModuleName ¶
func (s *UserStatus) ModuleName() string
func (*UserStatus) MustCheckSession ¶
func (s *UserStatus) MustCheckSession(ctx context.Context, session *usersystem.Session) bool
func (*UserStatus) MustIsUserAvaliable ¶
func (s *UserStatus) MustIsUserAvaliable(id string) bool
func (*UserStatus) StartService ¶
func (s *UserStatus) StartService() error
func (*UserStatus) StopService ¶
func (s *UserStatus) StopService() error
Click to show internal directories.
Click to hide internal directories.