Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// Expression is the expression to the value to be evaluated.
Expression expression.Expression
// Operator is the operator used to compare the value of the condition.
Operator Operator
// Value is the value to compare the value of the condition to.
Value any
// contains filtered or unexported fields
}
Condition represents a condition that will be evaluated for a given criterion.
type Criterion ¶
type Criterion struct {
// Context is the expression to the value to be evaluated.
Context *expression.Expression
// Condition is the condition to be evaluated.
Condition string
// Type is the type of criterion. Defaults to CriterionTypeSimple.
Type CriterionTypeUnion
// Extensions provides a list of extensions to the Criterion object.
Extensions *extensions.Extensions
// contains filtered or unexported fields
}
Criterion represents a criterion that will be evaluated for a given step.
type CriterionExpressionType ¶
type CriterionExpressionType struct {
// Type is the type of criterion.
Type CriterionType
// Version is the version of the criterion type.
Version CriterionTypeVersion
// contains filtered or unexported fields
}
CriterionExpressionType represents the type of expression used to evaluate the criterion.
func (*CriterionExpressionType) GetCore ¶
func (c *CriterionExpressionType) GetCore() *core.CriterionExpressionType
GetCore will return the low level representation of the criterion expression type object. Useful for accessing line and column numbers for various nodes in the backing yaml/json document.
func (*CriterionExpressionType) IsTypeProvided ¶
func (c *CriterionExpressionType) IsTypeProvided() bool
IsTypeProvided will return true if the criterion expression type has a type set.
func (*CriterionExpressionType) Validate ¶
func (c *CriterionExpressionType) Validate(opts ...validation.Option) []error
Validate will validate the criterion expression type object against the Arazzo specification.
type CriterionType ¶
type CriterionType string
CriterionType represents the type of criterion.
const ( // CriterionTypeSimple indicates that the criterion represents a simple condition to be evaluated. CriterionTypeSimple CriterionType = "simple" // CriterionTypeRegex indicates that the criterion represents a regular expression to be evaluated. CriterionTypeRegex CriterionType = "regex" // CriterionTypeJsonPath indicates that the criterion represents a JSONPath expression to be evaluated. CriterionTypeJsonPath CriterionType = "jsonpath" // CriterionTypeXPath indicates that the criterion represents an XPath expression to be evaluated. CriterionTypeXPath CriterionType = "xpath" )
type CriterionTypeUnion ¶
type CriterionTypeUnion struct {
// Type is the type of criterion.
Type *CriterionType
// ExpressionType is the type of the criterion and any version.
ExpressionType *CriterionExpressionType
// contains filtered or unexported fields
}
CriterionTypeUnion represents the union of a criterion type and criterion expression type.
func (*CriterionTypeUnion) FromCore ¶
func (c *CriterionTypeUnion) FromCore(cr any) error
func (*CriterionTypeUnion) GetCore ¶
func (c *CriterionTypeUnion) GetCore() *core.CriterionTypeUnion
GetCore will return the low level representation of the criterion type union object. Useful for accessing line and column numbers for various nodes in the backing yaml/json document.
func (CriterionTypeUnion) GetType ¶
func (c CriterionTypeUnion) GetType() CriterionType
GetType will return the type of the criterion.
func (CriterionTypeUnion) GetVersion ¶
func (c CriterionTypeUnion) GetVersion() CriterionTypeVersion
GetVersion will return the version of the criterion type.
func (*CriterionTypeUnion) IsTypeProvided ¶
func (c *CriterionTypeUnion) IsTypeProvided() bool
IsTypeProvided will return true if the criterion type union has a type set.
type CriterionTypeVersion ¶
type CriterionTypeVersion string
CriterionTypeVersion represents the version of the criterion type.
const ( CriterionTypeVersionNone CriterionTypeVersion = "" CriterionTypeVersionDraftGoesnerDispatchJsonPath00 CriterionTypeVersion = "draft-goessner-dispatch-jsonpath-00" CriterionTypeVersionXPath30 CriterionTypeVersion = "xpath-30" CriterionTypeVersionXPath20 CriterionTypeVersion = "xpath-20" CriterionTypeVersionXPath10 CriterionTypeVersion = "xpath-10" )
type Operator ¶
type Operator string
Operator represents the operator used to compare the value of a criterion. TODO ignoring the Logical grouping, index & property de-reference operators for now as there is consistency issues with the spec on how/when these are used (they should probably be part of the expression type)
const ( OperatorLT Operator = "<" OperatorLTE Operator = "<=" OperatorGT Operator = ">" OperatorGTE Operator = ">=" OperatorEQ Operator = "==" OperatorNE Operator = "!=" OperatorNot Operator = "!" // TODO not entirely sure how this is supposed to work OperatorAnd Operator = "&&" OperatorOr Operator = "||" )