validation

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Warnings []string
	Errors   []string
}

Result is a validation result consisting of a list of warnings and errors.

func Validate

func Validate(operator operator.Operator, version operator.Version, pkg repo.Package) Result

Validate runs several checks on an operator and it's referenced package.

func (*Result) AddError

func (r *Result) AddError(error string)

AddError adds an error to a validation result.

func (*Result) AddErrorf

func (r *Result) AddErrorf(error string, a ...interface{})

AddErrorf adds a formatted error to a validation result.

func (*Result) AddWarning

func (r *Result) AddWarning(warning string)

AddWarning adds a warning to a validation result.

func (*Result) AddWarningf

func (r *Result) AddWarningf(warning string, a ...interface{})

AddWarningf adds a formatted warning to a validation result.

Jump to

Keyboard shortcuts

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