validation

package
Version: v0.0.0-...-6c2d9fc Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartValidation

type ChartValidation struct {
	Path         string
	Validations  []*Validation
	Chartfile    *chart.Chartfile
	Manifests    []*manifest.Manifest
	ErrorCount   int
	WarningCount int
}

ChartValidation represents a specific instance of validation against a specific directory.

func (*ChartValidation) AddError

func (cv *ChartValidation) AddError(message string, fn Validator) *Validation

AddError adds error level validation to a ChartValidation.

func (*ChartValidation) AddWarning

func (cv *ChartValidation) AddWarning(message string, fn Validator) *Validation

AddWarning adds a warning level validation to a ChartValidation

func (*ChartValidation) ChartName

func (cv *ChartValidation) ChartName() string

ChartName returns the name of the chart directory.

func (*ChartValidation) Valid

func (cv *ChartValidation) Valid() bool

Valid returns true if every validation passes.

type Validation

type Validation struct {
	Message string
	// contains filtered or unexported fields
}

Validation represents a single validation of a ChartValidation.

func (*Validation) AddError

func (v *Validation) AddError(message string, fn Validator) *Validation

AddError adds an error level validation to a Validation.

func (*Validation) AddWarning

func (v *Validation) AddWarning(message string, fn Validator) *Validation

AddWarning adds a warning level validation to a Validation.

func (*Validation) ChartManifestsPath

func (v *Validation) ChartManifestsPath() string

ChartManifestsPath returns the fully qualified path to the "Manifests" directory.

func (*Validation) ChartYamlPath

func (v *Validation) ChartYamlPath() string

ChartYamlPath returns the fully qualified path to the "Chart.yaml" file.

func (*Validation) Chartfile

func (v *Validation) Chartfile() (*chart.Chartfile, error)

Chartfile returns a chart.Chartfile object formed from the Chart.yaml file.

type Validator

type Validator func(path string, v *Validation) (result bool)

Validator is a declared function that returns the result of a Validation.

Source Files

Jump to

Keyboard shortcuts

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