validator

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2022 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDecisionTableIdIsRequired                = "decision table ID is required"
	ErrDecisionTableNameIsRequired              = "decision table name is required"
	ErrDecisionTableHitPolicyIsInvalid          = "decision table hit policy is invalid"
	ErrDecisionTableCollectOperatorIsInvalid    = "decision table collect operator is invalid"
	ErrDecisionTableExpressionLanguageIsInvalid = "decision table expression language is invalid"
	ErrDecisionTableInputFieldIsRequired        = "at least one decision table input field is required"
	ErrDecisionTableOutputFieldIsRequired       = "at least one decision table output field is required"

	ErrInputCountMismatch  = "the number of input entries does not match the number of input fields"
	ErrOutputCountMismatch = "the number of output entries does not match the number of output fields"
)
View Source
var (
	ErrDecisionTableFieldIdIsRequired  = "field id is required"
	ErrDecisionTableFieldTypeIsInvalid = "field type is invalid"
)
View Source
var (
	ErrDecisionTableRuleAnnotationIsRequired          = "decision table rule annotation is required"
	ErrDecisionTableEntryReferencedFieldTypeIsInvalid = "referenced field type does not match field type"
)

Functions

This section is empty.

Types

type DecisionTableValidator

type DecisionTableValidator struct {
	// contains filtered or unexported fields
}

func (DecisionTableValidator) Validate

func (v DecisionTableValidator) Validate(decisionTable data.DecisionTable, standard data.Standard) error

type DecisionTableValidatorInterface

type DecisionTableValidatorInterface interface {
	Validate(table data.DecisionTable, standard data.Standard) error
}

func NewDecisionTableValidator

func NewDecisionTableValidator() DecisionTableValidatorInterface

type FieldValidator

type FieldValidator struct {
	// contains filtered or unexported fields
}

func (FieldValidator) Validate

func (v FieldValidator) Validate(field data.FieldInterface, standard data.Standard) error

type FieldValidatorInterface

type FieldValidatorInterface interface {
	Validate(field data.FieldInterface, standard data.Standard) error
}

func NewFieldValidator

func NewFieldValidator() FieldValidatorInterface

type RuleValidator

type RuleValidator struct {
	// contains filtered or unexported fields
}

func (RuleValidator) Validate

func (v RuleValidator) Validate(rule data.Rule, decisionTable data.DecisionTable, standard data.Standard) error

type RuleValidatorInterface

type RuleValidatorInterface interface {
	Validate(rule data.Rule, decisionTable data.DecisionTable, standard data.Standard) error
}

func NewRuleValidator

func NewRuleValidator() RuleValidatorInterface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL