Documentation
¶
Overview ¶
Package tifa is the API that application code imports: the request context, errors and Layout data reuse.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = core.ErrNotFound
ErrNotFound makes the server answer 404 without calling OnError.
Functions ¶
Types ¶
type Ctx ¶
Ctx wraps one request and its response. Load, the method handlers and OnRequest receive it.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
tifa
command
Command tifa builds and inspects tifa applications.
|
Command tifa builds and inspects tifa applications. |
|
internal
|
|
|
analyze
Package analyze reads a tifa application with go/packages and go/types, checks its routing conventions and produces the route manifest.
|
Package analyze reads a tifa application with go/packages and go/types, checks its routing conventions and produces the route manifest. |
|
bundle
Package bundle builds the front end of an application with the application's own Vite, which runs on Node: the browser bundle, and the SSR bundle that QuickJS evaluates.
|
Package bundle builds the front end of an application with the application's own Vite, which runs on Node: the browser bundle, and the SSR bundle that QuickJS evaluates. |
|
bundle/hostgen
command
Command hostgen writes js/runtime/host.js from js/host.
|
Command hostgen writes js/runtime/host.js from js/host. |
|
codegen
Package codegen writes the generated part of a tifa application into its .tifa directory: the Go main with the route registration, and the TypeScript route tree, the +route modules, the two entries, the tsconfig and the JavaScript runtime.
|
Package codegen writes the generated part of a tifa application into its .tifa directory: the Go main with the route registration, and the TypeScript route tree, the +route modules, the two entries, the tsconfig and the JavaScript runtime. |
|
config
Package config loads tifa settings from layered sources.
|
Package config loads tifa settings from layered sources. |
|
core
Package core holds the request context behind the public tifa package.
|
Package core holds the request context behind the public tifa package. |
|
devserver
Package devserver is the core of tifa dev.
|
Package devserver is the core of tifa dev. |
|
ssr
Package ssr renders pages to HTML in a pool of prewarmed QuickJS VMs.
|
Package ssr renders pages to HTML in a pool of prewarmed QuickJS VMs. |
|
Package js holds the JavaScript runtime sources of tifa.
|
Package js holds the JavaScript runtime sources of tifa. |
|
Package server is the tifa runtime.
|
Package server is the tifa runtime. |
|
Package tifatest builds the tifa.Ctx of a test request, so the Load, Layout, method handler and OnRequest functions of an app can be called in a Go test like any other function.
|
Package tifatest builds the tifa.Ctx of a test request, so the Load, Layout, method handler and OnRequest functions of an app can be called in a Go test like any other function. |
Click to show internal directories.
Click to hide internal directories.