renderer

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package renderer evaluates GoBeyond rendering plans and emits deterministic HTML without executing JavaScript.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(plan *renderplan.Plan, props any) (string, error)

Render validates and renders a complete plan. It never returns partial HTML.

Types

type Error

type Error struct {
	Code    ErrorCode
	Path    string
	Message string
	Cause   error
}

Error identifies a stable rendering failure and its rendering-plan path.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorCode

type ErrorCode string
const (
	CodeEvaluation ErrorCode = "evaluation_error"
	CodeRender     ErrorCode = "render_error"
	CodeUnsafeURL  ErrorCode = "unsafe_url"
	CodeUnsafeHTML ErrorCode = "unsafe_html"
)

type Renderer

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

func New

func New() *Renderer

func (*Renderer) Render

func (r *Renderer) Render(plan *renderplan.Plan, props any) (string, error)

type SafeHTML

type SafeHTML = renderplan.SafeHTML

SafeHTML and TrustedHTML are renderer-level aliases for applications that do not otherwise need to import the render-plan model.

func TrustedHTML

func TrustedHTML(value string) SafeHTML

Jump to

Keyboard shortcuts

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