render

package
v0.55.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package render bridges the Kiln world IR to a runnable framework.App.

Apply walks a *world.World and registers every surface — entities, pages, custom routes, hooks, seeds, middleware — onto an existing *framework.App. Hooks and routes carry declarative actions that kiln/effect evaluates; entity endpoints carry actions too but are not mounted in the live build-mode app (applyEntities screams per dropped endpoint; they graduate to owned-Go stubs via freeze).

The package is the bridge: callers compose a framework.App as usual and pass it through Apply. No reflection; conversions are explicit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(app *framework.App, w *world.World) error

Apply registers every world surface onto app: entities (with CRUD), pages, custom routes, hooks, seeds, and middleware. Hooks and routes carry declarative actions that effect evaluates; entity endpoints carry actions too, but rendering a custom entity endpoint needs run-then- respond semantics plus entity-row scope binding that kiln/effect does not provide — so applyEntities screams (slog.Warn) per dropped endpoint rather than mounting a handler that would 500. Those endpoints still graduate to owned-Go handler stubs via freeze.

func ApplySeeds

func ApplySeeds(db *sql.DB, w *world.World) error

ApplySeeds inserts the world's seed rows into db. It's a separate call because seeding requires migrations to have run first, and Kiln owns the migration step — Apply registers the entities, the caller migrates, the caller seeds.

func RenderNode

func RenderNode(n world.Node) render.HTML

RenderNode renders current design-system component kinds directly and falls back to the leaf noderender package for one-to-one semantic HTML nodes. This keeps Kiln's live preview on the same component/CSS surface as generated Go without pulling the authoring engine into generated apps.

Types

This section is empty.

Jump to

Keyboard shortcuts

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