Documentation
¶
Index ¶
- Variables
- func AtoiEmptyIsMinus1(value string, field_name string) (int, error)
- func IsEmptyOrSpacesLine(txt string) bool
- func ItoaMinusIsEmpty(value int) string
- func ParseUserList(txt string) []string
- func RenderUserList(lst []string) (string, error)
- func SplitLine(line string) []string
- func StringValueValid(str string) bool
- type Ctl
- func (self *Ctl) GShadowsPath() string
- func (self *Ctl) GroupsPath() string
- func (self *Ctl) NewAll()
- func (self *Ctl) NewGShadows()
- func (self *Ctl) NewGroups()
- func (self *Ctl) NewPasswds()
- func (self *Ctl) NewShadows()
- func (self *Ctl) PasswdsPath() string
- func (self *Ctl) ReadAll() error
- func (self *Ctl) ReadGShadows() error
- func (self *Ctl) ReadGroups() error
- func (self *Ctl) ReadPasswds() error
- func (self *Ctl) ReadShadows() error
- func (self *Ctl) ShadowsPath() string
- func (self *Ctl) WriteAll() error
- func (self *Ctl) WriteGShadows() error
- func (self *Ctl) WriteGroups() error
- func (self *Ctl) WritePasswds() error
- func (self *Ctl) WriteShadows() error
- type GShadow
- type GShadows
- func (self *GShadows) GetByAdministrator(user string) ([]*GShadow, error)
- func (self *GShadows) GetByMember(user string) ([]*GShadow, error)
- func (self *GShadows) GetByName(name string) (*GShadow, error)
- func (self *GShadows) Render() (string, error)
- func (self *GShadows) ShalowCopy() *GShadows
- func (self *GShadows) SortByName()
- type Group
- type Groups
- type Passwd
- type Passwds
- type Shadow
- type Shadows
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyOrSpacesLineRe = regexp.MustCompile(`^\s*$`)
Functions ¶
func IsEmptyOrSpacesLine ¶
func ItoaMinusIsEmpty ¶
func ParseUserList ¶
func RenderUserList ¶
func StringValueValid ¶
Types ¶
type Ctl ¶
func (*Ctl) GShadowsPath ¶
func (*Ctl) GroupsPath ¶
func (*Ctl) NewGShadows ¶
func (self *Ctl) NewGShadows()
func (*Ctl) NewPasswds ¶
func (self *Ctl) NewPasswds()
func (*Ctl) NewShadows ¶
func (self *Ctl) NewShadows()
func (*Ctl) PasswdsPath ¶
func (*Ctl) ReadGShadows ¶
func (*Ctl) ReadGroups ¶
func (*Ctl) ReadPasswds ¶
func (*Ctl) ReadShadows ¶
func (*Ctl) ShadowsPath ¶
func (*Ctl) WriteGShadows ¶
func (*Ctl) WriteGroups ¶
func (*Ctl) WritePasswds ¶
func (*Ctl) WriteShadows ¶
type GShadow ¶
func NewGShadowFromString ¶
type GShadows ¶
type GShadows struct {
GShadows []*GShadow
}
func NewGShadowsFromString ¶
func (*GShadows) GetByAdministrator ¶
func (*GShadows) ShalowCopy ¶
func (*GShadows) SortByName ¶
func (self *GShadows) SortByName()
type Group ¶
func NewGroupFromString ¶
type Groups ¶
type Groups struct {
Groups []*Group
}
func NewGroupsFromString ¶
func (*Groups) ShalowCopy ¶
type Passwd ¶
type Passwd struct { Login string Password string UserId int GroupId int Comment string Home string Shell string }
func NewPasswdFromString ¶
type Passwds ¶
type Passwds struct {
Passwds []*Passwd
}
func NewPasswdsFromString ¶
func (*Passwds) ShalowCopy ¶
type Shadow ¶
type Shadow struct { Login string Password string LastChangeDays int MinAgeDays int MaxAgeDays int WarningPeriodDays int InactivityPeriodDays int AccountExpirationDays int }
func NewShadowFromString ¶
type Shadows ¶
type Shadows struct {
Shadows []*Shadow
}
func NewShadowsFromString ¶
func (*Shadows) ShalowCopy ¶
func (*Shadows) SortByLogin ¶
func (self *Shadows) SortByLogin()
Click to show internal directories.
Click to hide internal directories.