Documentation ¶
Index ¶
- type Validator
- func All() []Validator
- func LoadExternalValidators() ([]Validator, error)
- func NewExternalValidator(definition ValidatorDefinition) Validator
- func NewRangeValidator() Validator
- func NewSchemaValidator() Validator
- func NewStatusValidator() Validator
- func NewStatusValidatorC(code int) Validator
- func Without(names ...string) []Validator
- type ValidatorDefinition
- type ValidatorStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
func LoadExternalValidators ¶
func NewExternalValidator ¶
func NewExternalValidator(definition ValidatorDefinition) Validator
NewExternalValidator creates a new external validator based on the given definition and returns a validation.Validator
func NewRangeValidator ¶
func NewRangeValidator() Validator
NewRangeValidator creates a new instance of a range validator
func NewSchemaValidator ¶
func NewSchemaValidator() Validator
NewSchemaValidator returns a new schema validator
func NewStatusValidator ¶
func NewStatusValidator() Validator
NewStatusValidator returns a new status validator that checks for status codes other than 200
func NewStatusValidatorC ¶
NewStatusValidatorC returns a new status validator that checks for status codes other than the given code
type ValidatorDefinition ¶
type ValidatorDefinition struct { Name string // Name is the name of the validator Path string // Path is the path to the executable Args []string // Args are the arguments to pass to the executable ReadFromStdin bool // ReadFromStdin controls whether the validator expects the item to validate on stdin Fatal bool // Fatal controls whether the validator is fatal or not that is if it fails the pipeline should stop }
ValidatorDefinition is the definition of an external validator
type ValidatorStatus ¶ added in v1.1.0
type ValidatorStatus string
const ( ValidatorStatusUnknown ValidatorStatus = "unknown" ValidatorStatusSuccess ValidatorStatus = "success" ValidatorStatusSkipped ValidatorStatus = "skipped" ValidatorStatusFail ValidatorStatus = "fail" )
Click to show internal directories.
Click to hide internal directories.