Documentation ¶
Index ¶
- Constants
- type Error
- func ErrFailedValidation(detail string, value interface{}) Error
- func ErrFieldMissing(detail string, field string, value interface{}) Error
- func ErrIOError(detail string, value interface{}) Error
- func ErrInvalidBundle(detail string, value interface{}) Error
- func ErrInvalidCSV(detail, csvName string) Error
- func ErrInvalidManifestStructure(detail string) Error
- func ErrInvalidObject(value interface{}, detail string) Error
- func ErrInvalidOperation(detail string, value interface{}) Error
- func ErrInvalidPackageManifest(detail string, pkgName string) Error
- func ErrInvalidParse(detail string, value interface{}) Error
- func ErrUnsupportedType(detail string) Error
- func NewError(t ErrorType, detail, field string, v interface{}) Error
- func NewWarn(t ErrorType, detail, field string, v interface{}) Error
- func WarnFailedValidation(detail string, value interface{}) Error
- func WarnFieldMissing(detail string, field string, value interface{}) Error
- func WarnIOError(detail string, value interface{}) Error
- func WarnInvalidBundle(detail string, value interface{}) Error
- func WarnInvalidCSV(detail, csvName string) Error
- func WarnInvalidManifestStructure(detail string) Error
- func WarnInvalidObject(detail string, value interface{}) Error
- func WarnInvalidOperation(detail string, value interface{}) Error
- func WarnInvalidPackageManifest(detail string, pkgName string) Error
- func WarnInvalidParse(detail string, value interface{}) Error
- func WarnUnsupportedType(detail string) Error
- type ErrorType
- type Level
- type ManifestResult
Constants ¶
View Source
const ( // LevelWarn is for Errors that should be addressed but do not have to be. LevelWarn = "Warning" // LevelError is for Errors that must be addressed. LevelError = "Error" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // Type is the ErrorType string constant that represents the kind of // error, ex. "MandatoryStructMissing", "I/O". Type ErrorType // Level is the severity of the Error. Level Level // Field is the dot-hierarchical YAML path of the missing data. Field string // BadValue is the field or file that caused an error or warning. BadValue interface{} // Detail represents the error message as a string. Detail string }
Error is an implementation of the 'error' interface, which represents a warning or an error in a yaml file.
func ErrFailedValidation ¶
func ErrFieldMissing ¶
func ErrIOError ¶
func ErrInvalidBundle ¶
func ErrInvalidCSV ¶
func ErrInvalidObject ¶
func ErrInvalidOperation ¶
func ErrInvalidParse ¶
TODO: see if more information can be extracted out of 'unmarshall/parsing' errors.
func ErrUnsupportedType ¶
func WarnFailedValidation ¶
func WarnFieldMissing ¶
func WarnIOError ¶
func WarnInvalidBundle ¶
func WarnInvalidCSV ¶
func WarnInvalidObject ¶
func WarnInvalidOperation ¶
func WarnInvalidParse ¶
func WarnUnsupportedType ¶
type ErrorType ¶
type ErrorType string
ErrorType defines what the error resulted from.
const ( ErrorInvalidCSV ErrorType = "CSVFileNotValid" ErrorFieldMissing ErrorType = "FieldNotFound" ErrorUnsupportedType ErrorType = "FieldTypeNotSupported" ErrorInvalidParse ErrorType = "ParseError" ErrorIO ErrorType = "FileReadError" ErrorFailedValidation ErrorType = "ValidationFailed" ErrorInvalidOperation ErrorType = "OperationFailed" ErrorInvalidManifestStructure ErrorType = "ManifestStructureNotValid" ErrorInvalidBundle ErrorType = "BundleNotValid" ErrorInvalidPackageManifest ErrorType = "PackageManifestNotValid" ErrorObjectFailedValidation ErrorType = "ObjectFailedValidation" )
type ManifestResult ¶
type ManifestResult struct { // Name is some piece of information identifying the manifest. Name string // Errors pertain to issues with the manifest that must be corrected. Errors []Error // Warnings pertain to issues with the manifest that are optional to correct. Warnings []Error }
ManifestResult represents verification result for each of the yaml files from the operator manifest.
func (*ManifestResult) Add ¶
func (r *ManifestResult) Add(errs ...Error)
Add appends errs to r in either r.Errors or r.Warnings depending on an error's Level.
func (ManifestResult) HasError ¶
func (r ManifestResult) HasError() bool
HasError returns true if r has any Errors of Level == LevelError.
func (ManifestResult) HasWarn ¶
func (r ManifestResult) HasWarn() bool
HasWarn returns true if r has any Errors of Level == LevelWarn.
Click to show internal directories.
Click to hide internal directories.