jinja

package
v0.11.420 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Filters *exec.FilterSet

Functions

func LoadMacros added in v0.11.320

func LoadMacros(fs afero.Fs, macrosPath string) (string, error)

LoadMacros loads all macro files from the given directory and returns them as a single string.

func PythonEnvVariables added in v0.5.7

func PythonEnvVariables(startDate, endDate *time.Time, pipelineName, runID string, fullRefresh bool) map[string]string

Types

type Context

type Context map[string]any

type FileSystemLoader added in v0.11.320

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

FileSystemLoader loads templates from a file system directory.

func NewFileSystemLoader added in v0.11.320

func NewFileSystemLoader(fs afero.Fs, baseDir string) *FileSystemLoader

NewFileSystemLoader creates a new FileSystemLoader for the given base directory.

func (*FileSystemLoader) Inherit added in v0.11.320

func (l *FileSystemLoader) Inherit(from string) (interface{}, error)

Inherit creates a new loader relative to the given path.

func (*FileSystemLoader) Read added in v0.11.320

func (l *FileSystemLoader) Read(path string) (io.Reader, error)

Read returns an io.Reader for the template's content.

func (*FileSystemLoader) Resolve added in v0.11.320

func (l *FileSystemLoader) Resolve(path string) (string, error)

Resolve resolves the given path in the current context.

type Renderer

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

func NewRenderer

func NewRenderer(context Context) *Renderer

func NewRendererWithMacros added in v0.11.320

func NewRendererWithMacros(context Context, macroContent string) *Renderer

NewRendererWithMacros creates a new Renderer with the given context and macro content.

func NewRendererWithStartEndDates

func NewRendererWithStartEndDates(startDate, endDate *time.Time, pipelineName, runID string, vars Context) *Renderer

func NewRendererWithStartEndDatesAndMacros added in v0.11.320

func NewRendererWithStartEndDatesAndMacros(startDate, endDate *time.Time, pipelineName, runID string, vars Context, macroContent string) *Renderer

NewRendererWithStartEndDatesAndMacros creates a new Renderer with the given dates, context, and macro content.

func NewRendererWithYesterday added in v0.5.3

func NewRendererWithYesterday(pipelineName, runID string) *Renderer

func (*Renderer) CloneForAsset added in v0.11.209

func (r *Renderer) CloneForAsset(ctx context.Context, pipe *pipeline.Pipeline, asset *pipeline.Asset) (RendererInterface, error)

func (*Renderer) Render

func (r *Renderer) Render(query string) (string, error)

type RendererInterface added in v0.11.209

type RendererInterface interface {
	Render(query string) (string, error)
	CloneForAsset(ctx context.Context, pipeline *pipeline.Pipeline, asset *pipeline.Asset) (RendererInterface, error)
}

this ugly interface is needed to avoid circular dependencies and the ability to create different renderer instances per asset.

Jump to

Keyboard shortcuts

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