Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
collage
command
Command collage is the collage CLI: it scaffolds new projects (collage new), drives an existing project's development loop (collage dev), compiles it into the binary you deploy (collage build), renders it to static files (collage export), and serves such an export the way a static host would (collage serve).
|
Command collage is the collage CLI: it scaffolds new projects (collage new), drives an existing project's development loop (collage dev), compiles it into the binary you deploy (collage build), renders it to static files (collage export), and serves such an export the way a static host would (collage serve). |
|
internal
|
|
|
ascii
Package ascii is the case folding collage uses on anything a request carries: a path, a header, a host, the markup a page rendered.
|
Package ascii is the case folding collage uses on anything a request carries: a path, a header, a host, the markup a page rendered. |
|
build
Package build renders a collage application's cacheable pages to static files on disk.
|
Package build renders a collage application's cacheable pages to static files on disk. |
|
cache
Package cache defines the render-output cache used by the HTTP handler: an interface, a collision-resistant key scheme, and an in-memory implementation.
|
Package cache defines the render-output cache used by the HTTP handler: an interface, a collision-resistant key scheme, and an in-memory implementation. |
|
cli
Package cli implements the collage command-line tool: scaffolding a new project, and driving an existing one's dev and static-build workflows.
|
Package cli implements the collage command-line tool: scaffolding a new project, and driving an existing one's dev and static-build workflows. |
|
cli/plugincontract
Package plugincontract is the rule a module meets to be a collage plugin "collage plugin add" accepts: a manifest at its root, a well-formed name, a New it can call without configuration, a release tag.
|
Package plugincontract is the rule a module meets to be a collage plugin "collage plugin add" accepts: a manifest at its root, a well-formed name, a New it can call without configuration, a release tag. |
|
core
Package core is the application orchestrator: it owns one instance of every subsystem — the template engine, the render engine, the cache, the dependency tracker, the router, the plugin registry, and observability — and exposes them through a single App with a server lifecycle.
|
Package core is the application orchestrator: it owns one instance of every subsystem — the template engine, the render engine, the cache, the dependency tracker, the router, the plugin registry, and observability — and exposes them through a single App with a server lifecycle. |
|
core/inspecttest/a/models
Package models is a test fixture: it shares its name, and a type name, with its sibling under b, to collide in the inspect type table.
|
Package models is a test fixture: it shares its name, and a type name, with its sibling under b, to collide in the inspect type table. |
|
core/inspecttest/b/models
Package models is a test fixture: see ../../a/models.
|
Package models is a test fixture: see ../../a/models. |
|
csrf
Package csrf issues and verifies cross-site request forgery tokens.
|
Package csrf issues and verifies cross-site request forgery tokens. |
|
datacache
Package datacache keeps the data fragments fetch, across renders, so that twenty pages showing one author ask the upstream for that author once.
|
Package datacache keeps the data fragments fetch, across renders, so that twenty pages showing one author ask the upstream for that author once. |
|
dependency
Package dependency tracks which cache keys were produced from which dependency tags, and resolves tags back to the keys they invalidate.
|
Package dependency tracks which cache keys were produced from which dependency tags, and resolves tags back to the keys they invalidate. |
|
devhost
Package devhost decides whether a request's Host header names this machine, which is what keeps a development server from answering a page on another site.
|
Package devhost decides whether a request's Host header names this machine, which is what keeps a development server from answering a page on another site. |
|
envfile
Package envfile reads the environment files "collage dev" and collage.Main load: KEY=value lines a variable already set in the environment wins over.
|
Package envfile reads the environment files "collage dev" and collage.Main load: KEY=value lines a variable already set in the environment wins over. |
|
httpx
Package httpx serves rendered pages over HTTP: it wires the router, the render engine, the cache, the dependency tracker, the plugin registry, and observability into one request lifecycle.
|
Package httpx serves rendered pages over HTTP: it wires the router, the render engine, the cache, the dependency tracker, the plugin registry, and observability into one request lifecycle. |
|
netaddr
Package netaddr holds the address matching that more than one package needs: reading a request's direct peer and asking whether it is one of a set of trusted ranges, and whether a request arrived over TLS.
|
Package netaddr holds the address matching that more than one package needs: reading a request's direct peer and asking whether it is one of a set of trusted ranges, and whether a request arrived over TLS. |
|
observability
Package observability defines the framework's metrics and tracing interfaces.
|
Package observability defines the framework's metrics and tracing interfaces. |
|
plugin
Package plugin defines the plugin system: the Plugin contract, the narrow Host capability surface plugins receive at startup, and a Registry that owns registration, lifecycle, and hook dispatch.
|
Package plugin defines the plugin system: the Plugin contract, the narrow Host capability surface plugins receive at startup, and a Registry that owns registration, lifecycle, and hook dispatch. |
|
render
Package render composes a page's fragment tree into HTML.
|
Package render composes a page's fragment tree into HTML. |
|
router
Package router resolves incoming HTTP requests to pages, documents, redirects, or a not-found result: a radix tree per locale shared by page and document paths, a shared radix tree for redirects, and locale resolution from the request path — the only source of a locale there is.
|
Package router resolves incoming HTTP requests to pages, documents, redirects, or a not-found result: a radix tree per locale shared by page and document paths, a shared radix tree for redirects, and locale resolution from the request path — the only source of a locale there is. |
|
template
Package template wraps a Go template engine behind a narrow interface so the underlying implementation (currently html/template) can be swapped without touching callers.
|
Package template wraps a Go template engine behind a narrow interface so the underlying implementation (currently html/template) can be swapped without touching callers. |
|
template/typecheck
Package typecheck walks a parsed template against the Go type of the data it will run with, and reports what is certain to fail when it renders: a field the type does not have, a method called with the wrong number of arguments, with an argument its parameter cannot take, or through a value that cannot reach it, a range over something that cannot be ranged over.
|
Package typecheck walks a parsed template against the Go type of the data it will run with, and reports what is certain to fail when it renders: a field the type does not have, a method called with the wrong number of arguments, with an argument its parameter cannot take, or through a value that cannot reach it, a range over something that cannot be ranged over. |
|
term
Package term decides whether output is going somewhere that can take colour, and writes it either way.
|
Package term decides whether output is going somewhere that can take colour, and writes it either way. |
|
pkg
|
|
|
collage
Package collage is the public API of the collage framework: a Go framework for server-side component-based rendering built from composable fragments and pages.
|
Package collage is the public API of the collage framework: a Go framework for server-side component-based rendering built from composable fragments and pages. |
|
collagetest
Package collagetest drives a collage application from a test the way a browser does: through its http.Handler, with cookies kept between requests and forms submitted with what the page put in them.
|
Package collagetest drives a collage application from a test the way a browser does: through its http.Handler, with cookies kept between requests and forms submitted with what the page put in them. |
Click to show internal directories.
Click to hide internal directories.