Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App represents a Lua app
type Config ¶
type Config struct {
// Path for looking up resources (Lua files, templates, public assets)
Path string
// Define the app entrypoint, default to `app.lua` (only valid for apps)
Entrypoint string
// HTTP client, if not set, `http.DefaultClient` will be used
Client *http.Client
// Hook for adding/setting additional modules/global variables
SetupState func(L *lua.LState, w http.ResponseWriter, r *http.Request) error
// Hook executed just after the script execution, just before the request is written
AfterScriptExecHook func(L *lua.LState) error
// Hook for custom `log` backend, defautl to `fmt.Println`
LogHook func(logLine string) error
// Stack trace will be displayed in debug mode
Debug bool
TemplateFuncMap template.FuncMap
}
Config represents an app configuration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.