Documentation
¶
Index ¶
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 Forge ¶
type Forge interface {
HTML(raw string) *template.HTML
Build(elements ...*template.HTML)
Builder(elements ...*template.HTML) *template.HTML
Frames(frame ...*template.HTML) [][]byte
Markdown() *markdown.Markdown
JS(path string) *template.HTML
CSS(css string) *template.HTML
Elem(tag, text string, attrs ...Attr) *template.HTML
Block(tag string, attrs Attr, children ...*template.HTML) *template.HTML
Void(tag string, attrs Attr) *template.HTML
}