validation

package
v1.8.66-rc Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWithWarning

type FileWithWarning struct {
	Filename    string
	Warning     string
	WarningKind WarningKind
}

type InvalidK8sSchemaError

type InvalidK8sSchemaError struct {
	ErrorMessage string
}

func (*InvalidK8sSchemaError) Error

func (e *InvalidK8sSchemaError) Error() string

type K8sValidationWarningPerValidFile

type K8sValidationWarningPerValidFile map[string]FileWithWarning

type K8sValidator

type K8sValidator struct {
	// contains filtered or unexported fields
}

func New

func New() *K8sValidator

func (*K8sValidator) GetK8sFiles

func (val *K8sValidator) GetK8sFiles(filesConfigurationsChan chan *extractor.FileConfigurations, concurrency int) (chan *extractor.FileConfigurations, chan *extractor.FileConfigurations)

func (*K8sValidator) InitClient

func (val *K8sValidator) InitClient(k8sVersion string, ignoreMissingSchemas bool, userProvidedSchemaLocations []string, permissiveSchema bool)

func (*K8sValidator) ValidateResources

func (val *K8sValidator) ValidateResources(filesConfigurationsChan chan *extractor.FileConfigurations, concurrency int, skipSchemaValidation bool) (chan *extractor.FileConfigurations, chan *extractor.InvalidFile, chan *FileWithWarning)

type ValidationClient

type ValidationClient interface {
	Validate(filename string, r io.ReadCloser) []kubeconformValidator.Result
}

type WarningKind

type WarningKind int
const (
	NetworkError WarningKind // a network error while validating the resource
	Skipped                  // resource has been skipped, for example if its kind was not found and the user added the --ignore-missing-schemas flag
)

Jump to

Keyboard shortcuts

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