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) Decode ¶ added in v0.10.6
Decode is the inverse of Encode: it parses a wire blob back into leaf Values (Type/Data only — Name isn't on the wire, so it's not restored). This lets the server read back what it once wrote, e.g. content pre- encoded via Save and fetched from S3.
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:
[2B count] then per leaf: [1B typeLen][type] [4B dataLen][data]
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
}