diff --git a/src/types/runtime.go b/src/types/runtime.go index 24a466926e..b4a7d44ad2 100644 --- a/src/types/runtime.go +++ b/src/types/runtime.go @@ -144,3 +144,29 @@ type DifferentialData struct { DifferentialRepos map[string]bool DifferentialPackageVersion string } + +// PackageFinding is a struct that contains a finding about something wrong with a package +type PackageFinding struct { + // YqPath is the path to the key where the error originated from, this is sometimes empty in the case of a general error + YqPath string + Description string + // Item is the value of a key that is causing an error, for example a bad image name + Item string + // PackageNameOverride shows the name of the package that the error originated from + // If it is not set the base package will be used when displaying the error + PackageNameOverride string + // PackagePathOverride shows the path to the package that the error originated from + // If it is not set the base package will be used when displaying the error + PackagePathOverride string + Severity Severity +} + +// Severity is the type of package error +// Either Err or Warning +type Severity int + +// different severities of package errors +const ( + SevErr Severity = iota + 1 + SevWarn +)