render

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoopAttrCount   = "count"
	LoopAttrForEach = "forEach"

	LoopKeyCountIndex = "count.index"
	LoopKeyForEachKey = "each.key"
	LoopKeyForEachVal = "each.value"
	LoopKeyItemsTotal = "items.total"
	LoopKeyItemsIndex = "items.index"
)

Variables

View Source
var LocalVars = map[string]struct{}{
	LoopKeyCountIndex: {},
	LoopKeyForEachKey: {},
	LoopKeyForEachVal: {},
}

Functions

func IsCelExpression

func IsCelExpression(s string) (bool, error)

Types

type Renderer

type Renderer struct {
	Vars      cache.Cache[vars.Variable]
	LocalVars map[string]any
}

func (*Renderer) Render

func (r *Renderer) Render(ctx context.Context, v any) (any, error)

Jump to

Keyboard shortcuts

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