engine

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package engine runs a template's transform pipeline over a selected timeline and renders the result into a display Document via the template's layout — the glue between the transform and template packages.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownLayoutType = errors.New("unknown layout block type")

ErrUnknownLayoutType is returned when a template's layout names a block type the engine doesn't know how to render.

Functions

This section is empty.

Types

type Engine

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

Engine builds and runs a template's transform pipeline, then renders its layout into a display Document. It looks up pipeline steps in registry.

func NewEngine

func NewEngine(registry *transform.Registry) *Engine

NewEngine builds an Engine backed by registry for resolving a template's transform steps by name.

func (*Engine) Run

func (e *Engine) Run(
	ctx context.Context,
	tmpl template.Template,
	timeline types.Timeline,
	form types.FormValues,
) (blocks.Document, error)

Run builds tmpl's transform pipeline, runs it over timeline and form, and renders tmpl's layout into a display Document. When tmpl.Layout is empty and the pipeline already appended blocks (e.g. via passthrough), those blocks are returned directly instead of an empty layout.

Jump to

Keyboard shortcuts

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