Documentation ¶
Index ¶
- Constants
- func GShadowDefault(s string) string
- func GroupsDefault(s string) string
- func ParseGShadow(path string) (map[string]GShadow, error)
- func ParseGShadowReader(r io.Reader) (map[string]GShadow, error)
- func ParseGroup(path string) (map[string]Group, error)
- func ParseGroupReader(r io.Reader) (map[string]Group, error)
- func ParseReader(r io.Reader) (map[string]Shadow, error)
- func ParseShadow(path string) (map[string]Shadow, error)
- func ParseUser(path string) (map[string]UserPasswd, error)
- func RetryForDuration() (time.Duration, error)
- func RetryIntervalDuration() (time.Duration, error)
- func ShadowDefault(s string) string
- func Unique(strSlice []string) []string
- func UserDefault(s string) string
- type EntitiesParser
- type EntitiesStore
- func (s *EntitiesStore) AddEntity(e Entity) error
- func (s *EntitiesStore) AddGShadow(e GShadow) error
- func (s *EntitiesStore) AddGroup(g Group) error
- func (s *EntitiesStore) AddShadow(e Shadow) error
- func (s *EntitiesStore) AddUser(u UserPasswd) error
- func (s *EntitiesStore) GetGShadow(name string) (GShadow, bool)
- func (s *EntitiesStore) GetGroup(name string) (Group, bool)
- func (s *EntitiesStore) GetShadow(name string) (Shadow, bool)
- func (s *EntitiesStore) GetUser(name string) (UserPasswd, bool)
- func (s *EntitiesStore) Load(dir string) error
- type Entity
- type GShadow
- type Group
- type Parser
- type Shadow
- type Signature
- type UserPasswd
Constants ¶
View Source
const ( ENTITY_ENV_DEF_GROUPS = "ENTITY_DEFAULT_GROUPS" ENTITY_ENV_DEF_PASSWD = "ENTITY_DEFAULT_PASSWD" ENTITY_ENV_DEF_SHADOW = "ENTITY_DEFAULT_SHADOW" ENTITY_ENV_DEF_GSHADOW = "ENTITY_DEFAULT_GSHADOW" ENTITY_ENV_DEF_DYNAMIC_RANGE = "ENTITY_DYNAMIC_RANGE" ENTITY_ENV_DEF_DELAY = "ENTITY_DEFAULT_DELAY" ENTITY_ENV_DEF_INTERVAL = "ENTITY_DEFAULT_INTERVAL" // https://systemd.io/UIDS-GIDS/#summary // https://systemd.io/UIDS-GIDS/#special-distribution-uid-ranges HumanIDMin = 1000 HumanIDMax = 60000 )
View Source
const ( UserKind = "user" ShadowKind = "shadow" GroupKind = "group" GShadowKind = "gshadow" )
Variables ¶
This section is empty.
Functions ¶
func GShadowDefault ¶
func GroupsDefault ¶
func ParseGShadow ¶
ParseGShadow opens the file and parses it into a map from usernames to Entries
func ParseGShadowReader ¶
ParseGShadowReader consumes the contents of r and parses it into a map from usernames to Entries
func ParseGroup ¶
ParseGroup opens the file and parses it into a map from usernames to Entries
func ParseGroupReader ¶
ParseGroupReader consumes the contents of r and parses it into a map from usernames to Entries
func ParseReader ¶
ParseReader consumes the contents of r and parses it into a map from usernames to Entries
func ParseShadow ¶
ParseShadow opens the file and parses it into a map from usernames to Entries
func RetryForDuration ¶
func RetryIntervalDuration ¶
func ShadowDefault ¶
func UserDefault ¶
Types ¶
type EntitiesParser ¶
type EntitiesStore ¶
type EntitiesStore struct { Users map[string]UserPasswd Groups map[string]Group Shadows map[string]Shadow GShadows map[string]GShadow }
func NewEntitiesStore ¶
func NewEntitiesStore() *EntitiesStore
func (*EntitiesStore) AddEntity ¶
func (s *EntitiesStore) AddEntity(e Entity) error
func (*EntitiesStore) AddGShadow ¶
func (s *EntitiesStore) AddGShadow(e GShadow) error
func (*EntitiesStore) AddGroup ¶
func (s *EntitiesStore) AddGroup(g Group) error
func (*EntitiesStore) AddShadow ¶
func (s *EntitiesStore) AddShadow(e Shadow) error
func (*EntitiesStore) AddUser ¶
func (s *EntitiesStore) AddUser(u UserPasswd) error
func (*EntitiesStore) GetGShadow ¶
func (s *EntitiesStore) GetGShadow(name string) (GShadow, bool)
func (*EntitiesStore) GetUser ¶
func (s *EntitiesStore) GetUser(name string) (UserPasswd, bool)
func (*EntitiesStore) Load ¶
func (s *EntitiesStore) Load(dir string) error
type GShadow ¶
type Group ¶
type Shadow ¶
type Shadow struct { Username string `yaml:"username"` Password string `yaml:"password"` LastChanged string `yaml:"last_changed"` MinimumChanged string `yaml:"minimum_changed"` MaximumChanged string `yaml:"maximum_changed"` Warn string `yaml:"warn"` Inactive string `yaml:"inactive"` Expire string `yaml:"expire"` Reserved string `yaml:"reserved"` }
type UserPasswd ¶
type UserPasswd struct { Username string `yaml:"username"` Password string `yaml:"password"` Uid int `yaml:"uid"` Gid int `yaml:"gid"` Group string `yaml:"group"` Info string `yaml:"info"` Homedir string `yaml:"homedir"` Shell string `yaml:"shell"` }
func (UserPasswd) Create ¶
func (u UserPasswd) Create(s string) error
func (UserPasswd) Delete ¶
func (u UserPasswd) Delete(s string) error
func (UserPasswd) GetKind ¶
func (u UserPasswd) GetKind() string
func (UserPasswd) String ¶
func (u UserPasswd) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.