Documentation
¶
Index ¶
- type CheckJSON
- type Checklist
- func ChecklistFromBytes(data []byte) (chklst Checklist, err error)
- func ChecklistFromFile(path string) (chklst Checklist, err error)
- func ChecklistFromStdin() (chklst Checklist, err error)
- func ChecklistFromURL(urlstr string, cache bool) (chklst Checklist, err error)
- func ChecklistsFromDir(dirpath string) (chklsts []Checklist, err error)
- type ChecklistJSON
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckJSON ¶
type CheckJSON struct { // ignored, included because JSON doesn't have comments Notes string // matches the ID() of the chkutil.Check object, used in construction process ID string // the parameters to the check. To be validated upon check construction. Parameters []string }
chkutil.CheckJSON is the check that gets unmarshalled out of the JSON configuration file. Because this prohibits type safety
type Checklist ¶
type Checklist struct {
Name, Notes string
Checks []chkutil.Check // list of chkutil.Checks to run
Origin string // where did it come from?
}
Checklist is a struct that provides a concise way of thinking about doing several checks and then returning some kind of output.
func ChecklistFromBytes ¶
ChecklistFromBytes takes a bytestring of utf8 encoded JSON and turns it into a checklist struct. Used by all checklist constructors below. It validates the number of parameters that each check has.
func ChecklistFromFile ¶
ChecklistFromFile reads the file at the path and parses its utf8 encoded json data, turning it into a checklist struct.
func ChecklistFromStdin ¶
ChecklistFromStdin reads the stdin pipe and parses its utf8 encoded json data, turning it into a checklist struct.
func ChecklistFromURL ¶
checklistsFromDir reads data retrieved from the URL and parses its utf8 encoded json data, turning it into a checklist struct. It also optionally caches this data at remoteCheckDir, currently "/var/run/distributive/".
func ChecklistsFromDir ¶
ChecklistsFromDir reads all of the files in the path and parses their utf8 encoded json data, turning it into a checklist struct.
func (*Checklist) MakeReport ¶
MakeReport runs all checks concurrently, and produces a user-facing string summary of their run.
type ChecklistJSON ¶
chkutil.ChecklsitJSON