replacer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceVariable

func ReplaceVariable(e *cel.Env, existingAst *cel.Ast, oldVarName string, newVarName string) (*cel.Ast, error)

Types

type InlineVariable

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

InlineVariable holds a variable name to be matched and an AST representing the expression graph which should be used to replace it.

func (*InlineVariable) Alias

func (v *InlineVariable) Alias() string

Alias returns the alias to use when performing cel.bind() calls during inlining.

func (*InlineVariable) Expr

func (v *InlineVariable) Expr() ast.Expr

Expr returns the inlined expression value.

func (*InlineVariable) Name

func (v *InlineVariable) Name() string

Name returns the qualified variable or field selection to replace.

func (*InlineVariable) Type

func (v *InlineVariable) Type() *cel.Type

Type indicates the inlined expression type.

Jump to

Keyboard shortcuts

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