{"modulePath":"github.com/operator-framework/api","version":"v0.47.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validator\n\n## Types\n\n```go\ntype Validator interface {\n\t// Validate takes a list of arbitrary objects and returns a slice of results,\n\t// one for each object validated.\n\tValidate(...interface{}) []errors.ManifestResult\n\t// WithValidators returns a Validator appended to a variable number of\n\t// Validator's.\n\tWithValidators(...Validator) Validators\n}\n```\nValidator is an interface for validating arbitrary objects.\n\n```go\ntype ValidatorFunc func(...interface{}) []errors.ManifestResult\n```\nValidatorFunc implements Validator. ValidatorFunc can be used as a wrapper for functions that run object validators.\n\n```go\nfunc (f ValidatorFunc) Validate(objs ...interface{}) (results []errors.ManifestResult)\n```\nValidate runs the ValidatorFunc on objs.\n\n```go\nfunc (f ValidatorFunc) WithValidators(vals ...Validator) Validators\n```\nWithValidators appends the ValidatorFunc to vals.\n\n```go\ntype Validators []Validator\n```\nValidators is a set of Validator's that implements Validate.\n\n```go\nfunc (validators Validators) Validate(objs ...interface{}) (results []errors.ManifestResult)\n```\nValidate invokes each Validator in Validators, collecting and returning the results.\n\n```go\nfunc (validators Validators) WithValidators(vals ...Validator) Validators\n```\nWithValidators appends vals to Validators.\n\n","path":"github.com/operator-framework/api/pkg/validation/interfaces","name":"validator","synopsis":"","isRedistributable":true}
