Documentation ¶
Index ¶
- Constants
- func CheckAbsolutePath(k string, args CommandArgs) (string, error)
- func CheckBool(k string, args CommandArgs) bool
- func CheckEnsure(args CommandArgs) (string, error)
- func CheckInt64(k string, args CommandArgs) (int64, error)
- func CheckString(k string, args CommandArgs) (string, error)
- func CheckStringChoice(k string, args CommandArgs, choices []string) (string, error)
- func CheckStringList(k string, args CommandArgs) ([]string, error)
- func CheckSystemGroup(k string, args CommandArgs) (*hacks.Group, error)
- func CheckSystemUser(k string, args CommandArgs) (*user.User, error)
- func Output(rc *RuntimeConfig, msgFmt string, msgArgs ...interface{})
- type CommandArgs
- type Commander
- type HaiconfError
- type RuntimeConfig
Constants ¶
View Source
const ( ENSURE_PRESENT = "present" ENSURE_ABSENT = "absent" )
Variables ¶
This section is empty.
Functions ¶
func CheckAbsolutePath ¶
func CheckAbsolutePath(k string, args CommandArgs) (string, error)
func CheckBool ¶
func CheckBool(k string, args CommandArgs) bool
func CheckEnsure ¶
func CheckEnsure(args CommandArgs) (string, error)
func CheckInt64 ¶
func CheckInt64(k string, args CommandArgs) (int64, error)
func CheckString ¶
func CheckString(k string, args CommandArgs) (string, error)
func CheckStringChoice ¶
func CheckStringChoice(k string, args CommandArgs, choices []string) (string, error)
func CheckStringList ¶
func CheckStringList(k string, args CommandArgs) ([]string, error)
func CheckSystemGroup ¶
func CheckSystemGroup(k string, args CommandArgs) (*hacks.Group, error)
func CheckSystemUser ¶
func CheckSystemUser(k string, args CommandArgs) (*user.User, error)
func Output ¶
func Output(rc *RuntimeConfig, msgFmt string, msgArgs ...interface{})
Types ¶
type CommandArgs ¶
type CommandArgs map[string]interface{}
type Commander ¶
type Commander interface { SetDefault(*RuntimeConfig) error SetUserConfig(CommandArgs) error Run() error }
type HaiconfError ¶
type HaiconfError struct { Msg string Args CommandArgs }
func NewArgError ¶
func NewArgError(m string, args CommandArgs) *HaiconfError
func (*HaiconfError) Error ¶
func (err *HaiconfError) Error() string
type RuntimeConfig ¶
Directories ¶
Path | Synopsis |
---|---|
Usage in lua configuration file Directory({ Path = "/tmp/haiconf/testdirectory", Mode = "0755", Owner = "jerome", Group = "wheel", Recurse = true, Ensure = "present", })
|
Usage in lua configuration file Directory({ Path = "/tmp/haiconf/testdirectory", Mode = "0755", Owner = "jerome", Group = "wheel", Recurse = true, Ensure = "present", }) |
Click to show internal directories.
Click to hide internal directories.