haiconf

package
v0.0.0-...-3af8ba7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2019 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

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

type RuntimeConfig struct {
	Verbose bool
	Output  io.Writer
}

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", })

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL