Documentation
¶
Index ¶
- func CELActivation(dataMap map[string]any, params map[string]any) map[string]any
- func CELVarOpts() []cel.EnvOption
- func CelParseParams(args []api.FunctionArgument, startIndex int) (map[string]any, error)
- func GenericFnDeletePath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnGetBoolPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnGetCEL(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, ...) (gaby.Container, any, error)
- func GenericFnGetIntPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnGetPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnGetStringPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnResourceWhereMatchWithComparators(resourceProvider yamlkit.ResourceProvider, ...) (gaby.Container, any, error)
- func GenericFnSelectWhereResourceWithComparators(resourceProvider yamlkit.ResourceProvider, ...) (gaby.Container, any, error)
- func GenericFnSetBoolPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnSetCEL(resourceProvider yamlkit.ResourceProvider, parsedData gaby.Container, ...) (gaby.Container, any, error)
- func GenericFnSetIntPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnSetStringPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, ...) (gaby.Container, any, error)
- func GenericFnVetCEL(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, ...) (gaby.Container, any, error)
- func GenericFnVetJSONSchema(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, ...) (gaby.Container, any, error)
- func GenericFnVetMergeKeys(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, ...) (gaby.Container, any, error)
- func GenericVetValues(resourceProvider yamlkit.ResourceProvider, parsedData gaby.Container, ...) (api.ValidationResult, error)
- func NewCELEnv(vars []cel.EnvOption, extraOpts ...cel.EnvOption) (*cel.Env, error)
- func RegisterPathSetterAndGetter(fh handler.FunctionRegistry, name string, parameters []api.FunctionParameter, ...)
- func RegisterStandardFunctions(fh handler.FunctionRegistry, converter configkit.ConfigConverter, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CELActivation ¶
CELActivation builds the activation map for a resource with params.
func CELVarOpts ¶
CELVarOpts returns the standard CEL variable options for r, object, and params.
func CelParseParams ¶
CelParseParams extracts key=value params from function arguments starting at the given index and returns them as a map[string]any suitable for CEL evaluation.
func GenericFnDeletePath ¶
func GenericFnDeletePath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnGetBoolPath ¶
func GenericFnGetBoolPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnGetCEL ¶
func GenericFnGetCEL(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, parsedData gaby.Container, args []api.FunctionArgument, extraEnvOpts ...cel.EnvOption) (gaby.Container, any, error)
GenericFnGetCEL implements get-cel extraction. Extra CEL env options can be passed by toolchain-specific overrides.
func GenericFnGetIntPath ¶
func GenericFnGetIntPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnGetPath ¶
func GenericFnGetPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument, whereExpressions []*api.VisitorRelationalExpression) (gaby.Container, any, error)
func GenericFnGetStringPath ¶
func GenericFnGetStringPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnResourceWhereMatchWithComparators ¶
func GenericFnResourceWhereMatchWithComparators(resourceProvider yamlkit.ResourceProvider, customComparators []api.CustomStringComparator, options *api.FunctionOptions, functionContext *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnSelectWhereResourceWithComparators ¶
func GenericFnSelectWhereResourceWithComparators(resourceProvider yamlkit.ResourceProvider, customComparators []api.CustomStringComparator, options *api.FunctionOptions, functionContext *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnSetBoolPath ¶
func GenericFnSetBoolPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument, upsert bool) (gaby.Container, any, error)
func GenericFnSetCEL ¶
func GenericFnSetCEL(resourceProvider yamlkit.ResourceProvider, parsedData gaby.Container, args []api.FunctionArgument, extraEnvOpts ...cel.EnvOption) (gaby.Container, any, error)
GenericFnSetCEL implements set-cel mutation. The CEL expression returns a partial resource map that is merged into the original resource using strategic merge (similar to Kubernetes ApplyConfiguration). Only the fields present in the CEL result are modified; all other fields are preserved. Extra CEL env options can be passed by toolchain-specific overrides.
func GenericFnSetIntPath ¶
func GenericFnSetIntPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument, upsert bool) (gaby.Container, any, error)
func GenericFnSetStringPath ¶
func GenericFnSetStringPath(resourceProvider yamlkit.ResourceProvider, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument, upsert bool) (gaby.Container, any, error)
func GenericFnVetCEL ¶
func GenericFnVetCEL(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, parsedData gaby.Container, args []api.FunctionArgument, extraEnvOpts ...cel.EnvOption) (gaby.Container, any, error)
GenericFnVetCEL implements vet-cel validation. Extra CEL env options can be passed by toolchain-specific overrides (e.g., Kubernetes admission policy libraries).
func GenericFnVetJSONSchema ¶
func GenericFnVetJSONSchema(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, _ *api.FunctionContext, parsedData gaby.Container, args []api.FunctionArgument) (gaby.Container, any, error)
func GenericFnVetMergeKeys ¶
func GenericFnVetMergeKeys(resourceProvider yamlkit.ResourceProvider, options *api.FunctionOptions, parsedData gaby.Container) (gaby.Container, any, error)
GenericFnVetMergeKeys checks for duplicate merge keys across all resources.
func GenericVetValues ¶
func GenericVetValues(resourceProvider yamlkit.ResourceProvider, parsedData gaby.Container, attributeName api.AttributeName, filter *api.ValueFilter) (api.ValidationResult, error)
GenericVetValues validates all values at paths registered for the given attribute name against the provided ValueFilter. It is exported so that other functions (e.g. vet-images) can call it.
func NewCELEnv ¶
NewCELEnv creates a CEL environment with the given variables and optional extra options. This provides the base CEL environment used by all generic CEL functions.
func RegisterPathSetterAndGetter ¶
func RegisterPathSetterAndGetter( fh handler.FunctionRegistry, name string, parameters []api.FunctionParameter, description string, attributeName api.AttributeName, resourceProvider yamlkit.ResourceProvider, addSetter bool, upsert bool, defaults bool, )
func RegisterStandardFunctions ¶
func RegisterStandardFunctions(fh handler.FunctionRegistry, converter configkit.ConfigConverter, resourceProvider yamlkit.ResourceProvider)
Types ¶
This section is empty.
Source Files
¶
- approve.go
- attributes.go
- cel.go
- delete_path.go
- delete_resource.go
- ensure_context.go
- get_resources.go
- get_set.go
- jsonschema.go
- merge_keys.go
- mutations.go
- needs_provides.go
- normalize.go
- placeholders.go
- replicate.go
- reset.go
- search_replace.go
- set_default_names.go
- set_references.go
- standard_functions.go
- starlark.go
- starlark_re.go
- upsert_resource.go
- vet_values.go
- where.go
- yq.go