Documentation ¶
Index ¶
- Constants
- func GetExternalValidatorEntrypoints(entrypoints string) ([]string, bool)
- func RunExternalValidators(ctx context.Context, entrypoints []string, bundleRoot string) ([]apierrors.ManifestResult, error)
- type Output
- type Result
- func (r *Result) AddError(err error)
- func (r *Result) AddInfo(msg string)
- func (r *Result) AddManifestResults(results ...apierrors.ManifestResult)
- func (r *Result) AddWarn(err error)
- func (r *Result) Combine(results ...Result) error
- func (r *Result) PrintWithFormat(format string) (failed bool, err error)
Constants ¶
const ( JSONAlpha1Output = "json-alpha1" TextOutput = "text" )
Variables ¶
This section is empty.
Functions ¶
func GetExternalValidatorEntrypoints ¶
GetExternalValidatorEntrypoints returns a list of external validator entrypoints retrieved from given entrypoints string. If not set or set to the empty string, GetExternalValidatorEntrypoints returns false.
func RunExternalValidators ¶
func RunExternalValidators(ctx context.Context, entrypoints []string, bundleRoot string) ([]apierrors.ManifestResult, error)
RunExternalValidators runs each entrypoint in entrypoint as a exec.Cmd with the single argument bundleRoot. External validators are expected to parse the bundle themselves with library APIs available in https://pkg.go.dev/github.com/operator-framework/api/pkg/manifests.
Types ¶
type Output ¶
Output represents the logs which are used to return the final result in the JSON format
type Result ¶
Result represents the final result
func NewResult ¶
func NewResult() *Result
NewResult return a new result object which starts with passed == true since has no errors
func (*Result) AddManifestResults ¶
func (r *Result) AddManifestResults(results ...apierrors.ManifestResult)
AddManifestResults adds warnings and errors in results to Results.