validation

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeValidator

type KubeValidator struct{}

KubeValidator is a struct that validates the kube configs associated with a cell config.

func NewKubeValidator

func NewKubeValidator() *KubeValidator

NewKubeValidator returns a new KubeValidator instance.

func (*KubeValidator) CheckYAML

func (k *KubeValidator) CheckYAML(paths []string) error

CheckYAML checks that each file ending with ".yaml" is actually parseable YAML. This is done separately from the kubeval checks because these errors cause the latter tool to not output valid JSON.

func (*KubeValidator) RunKubeval

func (k *KubeValidator) RunKubeval(
	ctx context.Context,
	path string,
) ([]ValidationResult, error)

RunKubeval runs kubeval over all files in the provided path.

type ValidationResult

type ValidationResult struct {
	Filename string   `json:"filename"`
	Kind     string   `json:"kind"`
	Status   string   `json:"status"`
	Errors   []string `json:"errors"`
}

ValidationResult stores the results of validating a single file.

Jump to

Keyboard shortcuts

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