Documentation
¶
Index ¶
- type Circuit
- type Fx
- func (f *Fx) Build(elements ...*template.HTML)
- func (f *Fx) BuildPanel(elements ...*template.HTML) *template.HTML
- func (f *Fx) Frame(path string)
- func (f *Fx) Frames(frame ...*template.HTML) *Value
- func (f *Fx) Markdown() *markdown.Markdown
- func (f *Fx) Panel(path string) *template.HTML
- func (f *Fx) Panels(panels ...*template.HTML) *Value
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Circuit ¶ added in v0.10.5
func NewCircuit ¶ added in v0.10.5
func NewCircuit() *Circuit
func (*Circuit) Compress ¶ added in v0.10.5
Compress gzip-compresses data at maximum compression. Bundles are compressed once at build time and served directly with Content-Encoding: gzip.
func (*Circuit) Encode ¶ added in v0.10.6
Encode flattens a Value tree to its leaves in order and writes the wire format the client decodes: repeated, back-to-back, per leaf:
[1B typeLen][type] [4B dataLen][data]
There is no leaf count on the wire — the response's length is the terminator. Names are not encoded — order is the contract.
func (*Circuit) Load ¶ added in v0.10.5
Load reads a file or directory at path and stores it in Routes keyed by the base name of path. A file becomes a leaf Value; a directory becomes a bundle. An http(s) path is treated as a pre-encoded wire blob (from Save) and decoded back into a bundle.
type Fx ¶
type Fx struct {
*Circuit
// contains filtered or unexported fields
}
func (*Fx) Build ¶ added in v0.10.9
Build registers a frame from its elements. The frame's root container is authored by the caller (template builder or custom frame file), not added here.
func (*Fx) BuildPanel ¶ added in v0.10.9
BuildPanel consolidates elements into a single panel frame, the same way Build consolidates space frames. It does not register the frame — pass the result to Panels(...) to do that.
func (*Fx) Frame ¶ added in v0.10.9
Frame registers a frame from a local file. The file authors its own root container div (by convention <div class="<filename stem>">). Nothing is wrapped for you — the content is trusted as-is, so only pass local, developer-controlled paths.
func (*Fx) Markdown ¶ added in v0.10.9
Markdown returns the configured goldmark instance for rendering markdown to HTML.