Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeaderPrefix = "X-Inertia" HeaderVersion = HeaderPrefix + "-Version" HeaderLocation = HeaderPrefix + "-Location" HeaderPartialData = HeaderPrefix + "-Partial-Data" HeaderPartialComponent = HeaderPrefix + "-Partial-Component" )
The Base "X-Inertia" header prefixes
Variables ¶
View Source
var DefaultConfig = Config{
Root: "resources/views",
AssetsPath: "resources/js",
Template: "app",
}
DefaultConfig is the default config
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Root string // The root directory of the application. FS http.FileSystem // The file system to use for loading templates and assets. AssetsPath string // The path to the assets directory. Template string // The name of the template to use. }
Config represents the configuration for the Inertia engine.
type Engine ¶
type Engine struct { *html.Engine // contains filtered or unexported fields }
Engine represents the Inertia engine.
func (*Engine) Middleware ¶
func (e *Engine) Middleware() fiber.Handler
Middleware returns a middleware function that sets the version header and context for the engine.
func (*Engine) View ¶
View function returns a Fiber handler function for rendering Inertia.js views.
func (*Engine) WithViewData ¶
Click to show internal directories.
Click to hide internal directories.