Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator interface { // Validate takes a list of arbitrary objects and returns a slice of results, // one for each object validated. Validate(...interface{}) []errors.ManifestResult // WithValidators returns a Validator appended to a variable number of // Validator's. WithValidators(...Validator) Validators }
Validator is an interface for validating arbitrary objects.
type ValidatorFunc ¶
type ValidatorFunc func(...interface{}) []errors.ManifestResult
ValidatorFunc implements Validator. ValidatorFunc can be used as a wrapper for functions that run object validators.
func (ValidatorFunc) Validate ¶
func (f ValidatorFunc) Validate(objs ...interface{}) (results []errors.ManifestResult)
Validate runs the ValidatorFunc on objs.
func (ValidatorFunc) WithValidators ¶
func (f ValidatorFunc) WithValidators(vals ...Validator) Validators
WithValidators appends the ValidatorFunc to vals.
type Validators ¶
type Validators []Validator
Validators is a set of Validator's that implements Validate.
func (Validators) Validate ¶
func (validators Validators) Validate(objs ...interface{}) (results []errors.ManifestResult)
Validate invokes each Validator in Validators, collecting and returning the results.
func (Validators) WithValidators ¶
func (validators Validators) WithValidators(vals ...Validator) Validators
WithValidators appends vals to Validators.
Click to show internal directories.
Click to hide internal directories.