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 ¶
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 ¶
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.