Documentation ¶
Index ¶
- func Tr(text string) string
- type Daemon
- type DefaultDomainUserConfig
- type ErrCodeType
- type ErrInvalidBackground
- type ExpiredStatus
- type ImageBlur
- type InterfaceConfig
- type LoginReminderInfo
- type LoginUtmpx
- type Manager
- func (m *Manager) AllowGuestAccount(sender dbus.Sender, allow bool) *dbus.Error
- func (m *Manager) CreateGroup(sender dbus.Sender, groupName string, gid uint32, isSystem bool) *dbus.Error
- func (m *Manager) CreateGuestAccount(sender dbus.Sender) (user string, busErr *dbus.Error)
- func (m *Manager) CreateUser(sender dbus.Sender, name, fullName string, accountType int32) (userPath dbus.ObjectPath, busErr *dbus.Error)
- func (m *Manager) DeleteGroup(sender dbus.Sender, groupName string, force bool) *dbus.Error
- func (m *Manager) DeleteUser(sender dbus.Sender, name string, rmFiles bool) *dbus.Error
- func (m *Manager) EnablePasswdChangedHandler(sender dbus.Sender, enable bool) *dbus.Error
- func (m *Manager) FindUserById(uid string) (user string, busErr *dbus.Error)
- func (m *Manager) FindUserByName(name string) (user string, busErr *dbus.Error)
- func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
- func (m *Manager) GetGroupInfoByName(name string) (groupInfo string, busErr *dbus.Error)
- func (m *Manager) GetGroups() (groups []string, busErr *dbus.Error)
- func (*Manager) GetInterfaceName() string
- func (m *Manager) GetPresetGroups(accountType int32) (groups []string, busErr *dbus.Error)
- func (m *Manager) IsPasswordValid(password string) (valid bool, msg string, code int32, busErr *dbus.Error)
- func (m *Manager) IsUsernameValid(sender dbus.Sender, name string) (valid bool, msg string, code int32, busErr *dbus.Error)
- func (m *Manager) ModifyGroup(sender dbus.Sender, currentGroupName string, newGroupName string, ...) *dbus.Error
- func (m *Manager) RandUserIcon() (iconFile string, busErr *dbus.Error)
- func (m *Manager) SetTerminalLocked(sender dbus.Sender, locked bool) *dbus.Error
- type User
- func (u *User) AddGroup(sender dbus.Sender, group string) *dbus.Error
- func (u *User) DeleteGroup(sender dbus.Sender, group string) *dbus.Error
- func (u *User) DeleteIconFile(sender dbus.Sender, icon string) *dbus.Error
- func (u *User) DeleteSecretKey(sender dbus.Sender) *dbus.Error
- func (u *User) EnableNoPasswdLogin(sender dbus.Sender, enabled bool) *dbus.Error
- func (u *User) EnableWechatAuth(sender dbus.Sender, value bool) *dbus.Error
- func (v *User) GetExportedMethods() dbusutil.ExportedMethods
- func (*User) GetInterfaceName() string
- func (u *User) GetLargeIcon() string
- func (u *User) GetReminderInfo() (info LoginReminderInfo, dbusErr *dbus.Error)
- func (u *User) GetSecretKey(sender dbus.Sender, username string) (string, *dbus.Error)
- func (u *User) GetSecretQuestions() (list []int, err *dbus.Error)
- func (u *User) IsIconDeletable(iconURI string) bool
- func (u *User) IsPasswordExpired() (bool, *dbus.Error)
- func (u *User) PasswordExpiredInfo() (expiredStatus ExpiredStatus, dayLeft int64, busErr *dbus.Error)
- func (u *User) SetAutomaticLogin(sender dbus.Sender, enabled bool) *dbus.Error
- func (u *User) SetCurrentWorkspace(sender dbus.Sender, currentWorkspace int32) *dbus.Error
- func (u *User) SetDesktopBackgrounds(sender dbus.Sender, val []string) *dbus.Error
- func (u *User) SetFullName(sender dbus.Sender, name string) *dbus.Error
- func (u *User) SetGreeterBackground(sender dbus.Sender, bg string) *dbus.Error
- func (u *User) SetGroups(sender dbus.Sender, groups []string) *dbus.Error
- func (u *User) SetHistoryLayout(sender dbus.Sender, list []string) *dbus.Error
- func (u *User) SetHomeDir(sender dbus.Sender, home string) *dbus.Error
- func (u *User) SetIconFile(sender dbus.Sender, iconURI string) *dbus.Error
- func (u *User) SetLayout(sender dbus.Sender, layout string) *dbus.Error
- func (u *User) SetLocale(sender dbus.Sender, locale string) *dbus.Error
- func (u *User) SetLocked(sender dbus.Sender, locked bool) *dbus.Error
- func (u *User) SetLongDateFormat(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) SetLongTimeFormat(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) SetMaxPasswordAge(sender dbus.Sender, nDays int32) *dbus.Error
- func (u *User) SetPassword(sender dbus.Sender, password string) *dbus.Error
- func (u *User) SetPasswordHint(hint string) (busErr *dbus.Error)
- func (u *User) SetQuickLogin(sender dbus.Sender, enabled bool) *dbus.Error
- func (u *User) SetSecretKey(sender dbus.Sender, secretKey string) *dbus.Error
- func (u *User) SetSecretQuestions(sender dbus.Sender, list map[int][]byte) *dbus.Error
- func (u *User) SetShell(sender dbus.Sender, shell string) *dbus.Error
- func (u *User) SetShortDateFormat(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) SetShortTimeFormat(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) SetUse24HourFormat(sender dbus.Sender, value bool) *dbus.Error
- func (u *User) SetWeekBegins(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) SetWeekdayFormat(sender dbus.Sender, value int32) *dbus.Error
- func (u *User) UpdateWechatAuthState() *dbus.Error
- func (u *User) VerifySecretQuestions(answers map[int]string) (failed []int, err *dbus.Error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Daemon ¶
type Daemon struct { *loader.ModuleBase // contains filtered or unexported fields }
func (*Daemon) GetDependencies ¶
type DefaultDomainUserConfig ¶
type DefaultDomainUserConfig map[string]*domainUserConfig
type ErrCodeType ¶
type ErrCodeType int32
const ( // 未知错误 ErrCodeUnkown ErrCodeType = iota // 权限认证失败 ErrCodeAuthFailed // 执行命令失败 ErrCodeExecFailed // 传入的参数不合法 ErrCodeParamInvalid )
func (ErrCodeType) String ¶
func (code ErrCodeType) String() string
type ErrInvalidBackground ¶
type ErrInvalidBackground struct {
FileName string
}
func (ErrInvalidBackground) Error ¶
func (err ErrInvalidBackground) Error() string
type ExpiredStatus ¶
type ExpiredStatus int
type ImageBlur ¶
type ImageBlur struct {
// contains filtered or unexported fields
}
func (*ImageBlur) GetExportedMethods ¶
func (v *ImageBlur) GetExportedMethods() dbusutil.ExportedMethods
func (*ImageBlur) GetInterfaceName ¶
type InterfaceConfig ¶
type LoginReminderInfo ¶
type LoginReminderInfo struct { Username string Spent struct { LastChange int Min int Max int Warn int Inactive int Expire int } CurrentLogin LoginUtmpx LastLogin LoginUtmpx FailCountSinceLastLogin int }
type LoginUtmpx ¶
type Manager ¶
type Manager struct { PropsMu sync.RWMutex UserList []string UserListMu sync.RWMutex // dbusutil-gen: ignore GuestIcon string AllowGuest bool // dbusutil-gen: equal=isStrvEqual GroupList []string IsTerminalLocked bool // 快速登录总开关 QuickLoginEnabled bool // contains filtered or unexported fields }
func NewManager ¶
func (*Manager) AllowGuestAccount ¶
func (*Manager) CreateGroup ¶
func (*Manager) CreateGuestAccount ¶
func (*Manager) CreateUser ¶
func (*Manager) DeleteGroup ¶
func (*Manager) EnablePasswdChangedHandler ¶
是否使能accounts服务在监听到/etc/passwd文件变化后,执行对应的属性更新和服务导出,只允许root用户操作该接口
func (*Manager) FindUserById ¶
func (*Manager) FindUserByName ¶
func (*Manager) GetExportedMethods ¶
func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
func (*Manager) GetGroupInfoByName ¶
func (*Manager) GetInterfaceName ¶
func (*Manager) GetPresetGroups ¶
func (*Manager) IsPasswordValid ¶
func (m *Manager) IsPasswordValid(password string) (valid bool, msg string, code int32, busErr *dbus.Error)
检测密码是否有效
ret0: 是否合法
ret1: 提示信息
ret2: 不合法代码
func (*Manager) IsUsernameValid ¶
func (m *Manager) IsUsernameValid(sender dbus.Sender, name string) (valid bool, msg string, code int32, busErr *dbus.Error)
检查用户名是否有效
ret0: 是否合法
ret1: 不合法原因
ret2: 不合法代码
func (*Manager) ModifyGroup ¶
func (*Manager) SetTerminalLocked ¶
type User ¶
type User struct { PropsMu sync.RWMutex UserName string UUID string FullName string Uid string Gid string HomeDir string Shell string Locale string Layout string IconFile string PasswordHint string Use24HourFormat bool WeekdayFormat int32 ShortDateFormat int32 LongDateFormat int32 ShortTimeFormat int32 LongTimeFormat int32 WeekBegins int32 // dbusutil-gen: equal=nil DesktopBackgrounds []string // dbusutil-gen: equal=isStrvEqual Groups []string GreeterBackground string XSession string PasswordStatus string MaxPasswordAge int32 PasswordLastChange int32 // 用户是否被禁用 Locked bool // 是否允许此用户自动登录 AutomaticLogin bool // 是否快速登录 QuickLogin bool // 当前工作区 Workspace int32 // deprecated property SystemAccount bool NoPasswdLogin bool AccountType int32 LoginTime uint64 CreatedTime uint64 // dbusutil-gen: equal=nil IconList []string // dbusutil-gen: equal=nil HistoryLayout []string WechatAuthEnabled bool // contains filtered or unexported fields }
func NewDomainUser ¶
func (*User) DeleteIconFile ¶
只能删除不是用户当前图标的自定义图标
func (*User) EnableNoPasswdLogin ¶
func (*User) EnableWechatAuth ¶
func (*User) GetExportedMethods ¶
func (v *User) GetExportedMethods() dbusutil.ExportedMethods
func (*User) GetInterfaceName ¶
func (*User) GetReminderInfo ¶
func (u *User) GetReminderInfo() (info LoginReminderInfo, dbusErr *dbus.Error)
func (*User) GetSecretKey ¶
func (*User) IsIconDeletable ¶
func (*User) PasswordExpiredInfo ¶
func (u *User) PasswordExpiredInfo() (expiredStatus ExpiredStatus, dayLeft int64, busErr *dbus.Error)
func (*User) SetAutomaticLogin ¶
func (*User) SetCurrentWorkspace ¶
记录当前工作区,登录时前端从记录文件中获取当前工作区以及相应的桌面背景
func (*User) SetDesktopBackgrounds ¶
func (*User) SetGreeterBackground ¶
func (*User) SetHistoryLayout ¶
func (*User) SetIconFile ¶
func (*User) SetLongDateFormat ¶
func (*User) SetLongTimeFormat ¶
func (*User) SetMaxPasswordAge ¶
func (*User) SetPassword ¶
func (*User) SetQuickLogin ¶
设置用户是否快速登录
func (*User) SetSecretKey ¶
func (*User) SetSecretQuestions ¶
func (*User) SetShortDateFormat ¶
func (*User) SetShortTimeFormat ¶
func (*User) SetUse24HourFormat ¶
func (*User) SetWeekBegins ¶
func (*User) SetWeekdayFormat ¶
func (*User) UpdateWechatAuthState ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.