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