Documentation
¶
Index ¶
- func Add(add ...Item)
- func AddFromSource(source string, add ...Item)
- func Apply() error
- func RedError(e error) string
- func RedPrintln(s string)
- func SetAssetLoader(fn func(string) (io.Reader, error))
- func SetDescribe(s string)
- func SetSourcePrefix(s string)
- func Warnf(str string, args ...interface{})
- type Color
- type File
- type Group
- type Item
- type Package
- type StaticFiler
- type User
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFromSource ¶
func RedPrintln ¶
func RedPrintln(s string)
func SetDescribe ¶
func SetDescribe(s string)
func SetSourcePrefix ¶
func SetSourcePrefix(s string)
Types ¶
type File ¶
type File struct {
Path string
User User
Content string
Template string
Delete bool
// contains filtered or unexported fields
}
func (*File) StaticFiles ¶
type Group ¶
type Group struct {
Name string
Gid int
// If GidPrimary (yaml: gid_primary) is true, the gid is treated as the primary identifier.
// Behavior:
// GidPrimary true: groupmod --new-name (name) is used if you change the name of a group
// GidPrimary false: groupmod -o (gid) is used if you change the gid of a group
GidPrimary bool `khan:"gid_primary"`
Delete bool
// contains filtered or unexported fields
}
type StaticFiler ¶
type StaticFiler interface {
StaticFiles() []string
}
type User ¶
type User struct {
Name string
// Primary group. If not specified, user name is used
Group string
Uid int
// Supplemental groups
Groups []string
Gecos string
Home string
Shell string
// Password is the passord encrypted with libcrypt.
// Password if blank will actually be set to "!". If "!", "!!", or "x" are found
// in /etc/shadow, it will be translated to a blank password. If you want an actually
// blank password (not safe) use BlankPassword: true (blank_password: true in yaml).
Password string
BlankPassword bool `khan:"blank_password"`
// If UidPrimary (yaml: uid_primary) is true, the uid is treated as the primary identifier.
// Behavior:
// UidPrimary true: usermod -l (name) is used if you change the name of the user
// UidPrimary false: usermod -u (uid) is used if you change the uid of the user
UidPrimary bool `khan:"uid_primary"`
Delete bool
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.