Documentation
¶
Overview ¶
Package refs validates loop template and CEL references against one namespace.
Index ¶
Constants ¶
View Source
const ( // CodeUnknownReference identifies an unknown namespace root or symbol. CodeUnknownReference = "unknown_reference" // CodeUnresolvablePath identifies a known symbol with a missing child path. CodeUnresolvablePath = "unresolvable_path" // CodeItemOutsideFanout identifies item/index usage outside fan-out scope. CodeItemOutsideFanout = "item_outside_fanout" // CodeConditionNotBool identifies a CEL expression that does not return bool. CodeConditionNotBool = "condition_not_bool" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConditionCompiler ¶
type ConditionCompiler struct {
// contains filtered or unexported fields
}
ConditionCompiler compiles CEL expressions over the shared namespace.
func NewConditionCompiler ¶
func NewConditionCompiler( namespace Namespace, opts ...ConditionCompilerOption, ) (*ConditionCompiler, error)
NewConditionCompiler builds a CEL environment for the shared namespace.
type ConditionCompilerOption ¶
type ConditionCompilerOption func(*ConditionCompiler)
ConditionCompilerOption configures a condition compiler.
func WithCostLimit ¶
func WithCostLimit(limit uint64) ConditionCompilerOption
WithCostLimit overrides the CEL runtime cost limit.
type Namespace ¶
type Namespace struct {
Inputs map[string]Schema
Nodes map[string]NodeSchema
AllowFanout bool
AllowTrigger bool
AllowEvent bool
}
Namespace is the single reference namespace consumed by templates and CEL.
func (Namespace) ValidatePath ¶
ValidatePath checks a dotted path against the namespace.
type NodeSchema ¶
NodeSchema exposes the referenceable output/status shape for one node.
Click to show internal directories.
Click to hide internal directories.