Versions in this module Expand all Collapse all v0 v0.6.1 Apr 3, 2026 v0.6.0 Apr 2, 2026 Changes in this version + var DefaultConfig = Config + type Config struct + GIDMax uint32 + GIDMin uint32 + UIDMax uint32 + UIDMin uint32 + type IDGenerator struct + GIDMax uint32 + GIDMin uint32 + UIDMax uint32 + UIDMin uint32 + func (g *IDGenerator) GenerateGID(lockedEntries *localentries.UserDBLocked, owner IDOwner) (uint32, func(), error) + func (g *IDGenerator) GenerateUID(lockedEntries *localentries.UserDBLocked, owner IDOwner) (uint32, func(), error) + type IDGeneratorIface interface + GenerateGID func(lockedEntries *localentries.UserDBLocked, owner IDOwner) (gid uint32, cleanup func(), err error) + GenerateUID func(lockedEntries *localentries.UserDBLocked, owner IDOwner) (uid uint32, cleanup func(), err error) + type IDGeneratorMock struct + GIDsToGenerate []uint32 + UIDsToGenerate []uint32 + func (g *IDGeneratorMock) GenerateGID(_ *localentries.UserDBLocked, _ IDOwner) (uint32, func(), error) + func (g *IDGeneratorMock) GenerateUID(_ *localentries.UserDBLocked, _ IDOwner) (uint32, func(), error) + type IDOwner interface + UsedGIDs func() ([]uint32, error) + UsedUIDs func() ([]uint32, error) + type Manager struct + func NewManager(config Config, dbDir string, args ...Option) (m *Manager, err error) + func (m *Manager) AllGroups() ([]types.GroupEntry, error) + func (m *Manager) AllShadows() ([]types.ShadowEntry, error) + func (m *Manager) AllUsers() ([]types.UserEntry, error) + func (m *Manager) BrokerForUser(username string) (string, error) + func (m *Manager) GroupByID(gid uint32) (types.GroupEntry, error) + func (m *Manager) GroupByName(groupname string) (types.GroupEntry, error) + func (m *Manager) IsUserLocked(username string) (bool, error) + func (m *Manager) LockUser(username string) error + func (m *Manager) RegisterUserPreAuth(name string) (uid uint32, err error) + func (m *Manager) SetGroupID(name string, gid uint32) (resp *SetGroupIDResp, err error) + func (m *Manager) SetUserID(name string, uid uint32) (resp *SetUserIDResp, err error) + func (m *Manager) ShadowByName(username string) (types.ShadowEntry, error) + func (m *Manager) Stop() error + func (m *Manager) UnlockUser(username string) error + func (m *Manager) UpdateBrokerForUser(username, brokerID string) error + func (m *Manager) UpdateUser(u types.UserInfo) (err error) + func (m *Manager) UsedGIDs() ([]uint32, error) + func (m *Manager) UsedUIDs() ([]uint32, error) + func (m *Manager) UserByID(uid uint32) (types.UserEntry, error) + func (m *Manager) UserByName(username string) (types.UserEntry, error) + type NoDataFoundError = db.NoDataFoundError + type Option func(*options) + func WithIDGenerator(g IDGeneratorIface) Option + type SetGroupIDResp struct + HomeDirOwnerChanged bool + IDChanged bool + Warnings []string + type SetUserIDResp struct + HomeDirOwnerChanged bool + IDChanged bool + Warnings []string