validator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultSchemaLocation = "https://kubernetesjsonschema.dev"

DefaultSchemaLocation is the default value for SchemaLocation.

View Source
var SchemaLocation string

SchemaLocation represents the URL of schema location.

View Source
var Version string

Version represents the Kubernetes version.

Functions

This section is empty.

Types

type ValidFormat

type ValidFormat struct{}

ValidFormat is for some formats in Kubernetes loaded to gojsonschema.

func (ValidFormat) IsFormat

func (f ValidFormat) IsFormat(input interface{}) bool

IsFormat fulfills gojsonschema.FormatChecker interface.

type ValidationResult

type ValidationResult struct {
	FileName   string
	Kind       string
	APIVersion string
	Errors     []gojsonschema.ResultError
}

ValidationResult contains Kubernetes resource schema validation result.

func Validate

func Validate(config []byte, fileName string) ([]ValidationResult, error)

Validate individual resources in a Kubernetes YAML file against the Kubernetes json schema.

Jump to

Keyboard shortcuts

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