Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Rules = []rule{
checkDiscoveryURL,
checkEncoding,
checkStructure,
checkValidity,
checkWriteFiles,
checkWriteFilesUnderCoreos,
}
Rules contains all of the validation rules.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context represents the current position within a newline-delimited string. Each line is loaded, one by one, into currentLine (newline omitted) and lineNumber keeps track of its position within the original string.
func NewContext ¶
NewContext creates a Context from the provided data. It strips out all carriage returns and moves to the first line (if available).
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry represents a single generic item in the report.
func (Entry) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface, returning the entry encoded as a JSON object.
type Node ¶
func NewNode ¶
NewNode returns the Node representation of the given value. The context will be used in an attempt to determine line numbers for the given value.
func (Node) Child ¶
Child attempts to find the child with the given name in the Node's list of children. If no such child is found, an invalid Node is returned.
type Report ¶
type Report struct {
// contains filtered or unexported fields
}
Report represents the list of entries resulting from validation.
func Validate ¶
Validate runs a series of validation tests against the given userdata and returns a report detailing all of the issues. Presently, only cloud-configs can be validated.
func (*Report) Entries ¶
Entries returns the list of entries in the report.
func (*Report) Error ¶
Error adds an error entry to the report.
func (*Report) Info ¶
Info adds an info entry to the report.