{"modulePath":"github.com/operator-framework/operator-sdk","version":"v1.20.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validate\n\n## Constants\n\n```go\nconst (\n\tJSONAlpha1Output = \"json-alpha1\"\n\tTextOutput       = \"text\"\n)\n```\n\n## Functions\n\n```go\nfunc GetExternalValidatorEntrypoints(entrypoints string) ([]string, bool)\n```\nGetExternalValidatorEntrypoints returns a list of external validator entrypoints retrieved from given entrypoints string. If not set or set to the empty string, GetExternalValidatorEntrypoints returns false.\n\n```go\nfunc RunExternalValidators(ctx context.Context, entrypoints []string, bundleRoot string) ([]apierrors.ManifestResult, error)\n```\nRunExternalValidators 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](https://pkg.go.dev/github.com/operator-framework/api/pkg/manifests).\n\n## Types\n\n```go\ntype Output struct {\n\tType    string `json:\"type\"`\n\tMessage string `json:\"message\"`\n}\n```\nOutput represents the logs which are used to return the final result in the JSON format\n\n```go\ntype Result struct {\n\tPassed  bool     `json:\"passed\"`\n\tOutputs []Output `json:\"outputs\"`\n}\n```\nResult represents the final result\n\n```go\nfunc Combine(results ...Result) (r Result, err error)\n```\nCombine creates a new Result and calls Result.Combine(results).\n\n```go\nfunc NewResult() *Result\n```\nNewResult return a new result object which starts with passed == true since has no errors\n\n```go\nfunc (r *Result) AddError(err error)\n```\nAddError will add a log to the result with the Error Level\n\n```go\nfunc (r *Result) AddInfo(msg string)\n```\nAddInfo will add a log to the result with the Info Level\n\n```go\nfunc (r *Result) AddManifestResults(results ...apierrors.ManifestResult)\n```\nAddManifestResults adds warnings and errors in results to Results.\n\n```go\nfunc (r *Result) AddWarn(err error)\n```\nAddWarn will add a log to the result with the Warn Level\n\n```go\nfunc (r *Result) Combine(results ...Result) error\n```\nCombine combines results into r, setting r.Passed = false if any Result in results has r.Passed == false.\n\n```go\nfunc (r *Result) PrintWithFormat(format string) (failed bool, err error)\n```\nPrintWithFormat prints output to w in format, and exits if some object in output is not in a passing state.\n\n","path":"github.com/operator-framework/operator-sdk/pkg/validate","name":"validate","synopsis":"","isRedistributable":true}
