Documentation
¶
Overview ¶
Package usermanager provides a service for user management.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Quota ¶
type Quota struct {
// contains filtered or unexported fields
}
Quota defines a user quota for requests.
type User ¶
type User struct {
UserInfo models.UserInfo
Session UserSession
}
User defines user info and session.
func (*User) RequestQuota ¶
RequestQuota checks a user request limit.
type UserInformer ¶
UserInformer defines an interface for getting user info.
type UserManager ¶
type UserManager struct {
UserInformer UserInformer
QuotaConfig definition.Quota
// contains filtered or unexported fields
}
UserManager defines a user manager service.
func NewUserManager ¶
func NewUserManager(informer UserInformer, quotaCfg definition.Quota, users UserList) *UserManager
NewUserManager creates a new user manager.
func (*UserManager) CreateUser ¶
func (um *UserManager) CreateUser(userID string) (*User, error)
CreateUser creates a new user.
type UserSession ¶
type UserSession struct {
PlatformSessionID string
ChannelID string
Direct bool
Quota Quota
LastActionTs time.Time
IdleInterval uint
Clone *dblabmodels.Clone
ConnParams models.Clone
Pool *pgxpool.Pool `json:"-"`
CloneConnection *pgx.Conn `json:"-"`
DBVersion int `json:"-"`
}
UserSession defines a user session.
Click to show internal directories.
Click to hide internal directories.