validator

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrDecisionTableEntryExpressionLanguageIsInvalid = "invalid entry expression language"
)

Variables

View Source
var (
	ErrDecisionTableIdIsRequired                = "decision table ID is required"
	ErrDecisionTableNameIsRequired              = "decision table name is required"
	ErrDecisionTableHitPolicyIsInvalid          = "invalid decision table hit policy"
	ErrDecisionTableCollectOperatorIsInvalid    = "invalid decision table collect operator"
	ErrDecisionTableExpressionLanguageIsInvalid = "invalid decision table expression language"
	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 (
	ErrDecisionTableFieldNameIsRequired = "field name is required"
	ErrDecisionTableFieldTypeIsInvalid  = "invalid field type"
)
View Source
var (
	ErrDecisionTableRuleAnnotationIsRequired          = "decision table rule annotation is required"
	ErrDecisionTableEntryReferencedFieldTypeIsInvalid = "referenced field type does not match field type"
)

Functions

Types

type DecisionTableValidator

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

func (DecisionTableValidator) Validate

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

type DecisionTableValidatorInterface

type DecisionTableValidatorInterface interface {
	Validate(decisionTable decisionTable.DecisionTable, standard standard.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 field.Field, standard standard.Standard) error

type FieldValidatorInterface

type FieldValidatorInterface interface {
	Validate(field field.Field, standard standard.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 rule.Rule, decisionTable decisionTable.DecisionTable, standard standard.Standard) error

type RuleValidatorInterface

type RuleValidatorInterface interface {
	Validate(rule rule.Rule, decisionTable decisionTable.DecisionTable, standard standard.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