Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoDiscoverExternal ¶
Types ¶
type ExtendedValidationItem ¶
type ExtendedValidationItem struct {
// contains filtered or unexported fields
}
func (ExtendedValidationItem) Definition ¶
func (i ExtendedValidationItem) Definition() definitions.Endpoint
func (ExtendedValidationItem) Response ¶
func (i ExtendedValidationItem) Response() validation.EndpointResponse
type FindExecFunc ¶
type SlimValidationItem ¶
type SlimValidationItem struct {
// contains filtered or unexported fields
}
func (SlimValidationItem) Definition ¶
func (i SlimValidationItem) Definition() definitions.Endpoint
func (SlimValidationItem) Response ¶
func (i SlimValidationItem) Response() validation.EndpointResponse
type ValidationItem ¶
type ValidationItem interface {
Response() validation.EndpointResponse
Definition() definitions.Endpoint
}
func NewValidationItem ¶
func NewValidationItem(response validation.EndpointResponse, definition definitions.Endpoint) ValidationItem
type Validator ¶
type Validator interface {
Name() string
Validate(item ValidationItem) error
IsFatal() bool
IsSlim() bool
}
func LoadExternalValidators ¶
LoadExternalValidators loads the exernal validators from the definitions
func NewExternalValidator ¶
func NewExternalValidator(definition ValidatorDefinition) Validator
NewExternalValidator creates a new external validator based on the given definition and returns a validation.Validator
func NewSchemaValidator ¶
func NewSchemaValidator() Validator
NewSchemaValidator returns a new schema validator
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
Fatal bool // Fatal controls whether the validator is fatal or not that is if it fails the pipeline should stop
Slim bool // Slim controls how much data the validator gets. Setting this to true reduces the context the validator gets
}
ValidatorDefinition is the definition of an external validator
type ValidatorStatus ¶
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.