inertia

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2025 License: MIT Imports: 11 Imported by: 1

README

Lemmego Inertia

The inertia plugin for the Lemmego framework.

Documentation

Index

Constants

View Source
const InertiaBuildPath = "/public/build/"
View Source
const InertiaManifestPath = "./public/build/manifest.json"
View Source
const InertiaRootTemplatePath = "resources/views/root.html"
View Source
const ViteHotPath = "./public/hot"

Variables

This section is empty.

Functions

func Respond

func Respond(c app.Context, filePath string, props map[string]any) error

func Vite

func Vite(manifestPath, buildDir string) func(path string) (string, error)

Types

type Flash

type Flash struct {
	// contains filtered or unexported fields
}

func NewFlash

func NewFlash() *Flash

func (*Flash) FlashClearHistory

func (p *Flash) FlashClearHistory(ctx context.Context) error

func (*Flash) FlashErrors

func (p *Flash) FlashErrors(ctx context.Context, errors gonertia.ValidationErrors) error

func (*Flash) GetErrors

func (p *Flash) GetErrors(ctx context.Context) (gonertia.ValidationErrors, error)

func (*Flash) ShouldClearHistory

func (p *Flash) ShouldClearHistory(ctx context.Context) (bool, error)

type Inertia

type Inertia struct {
	// contains filtered or unexported fields
}

func Get

func Get(a app.App) *Inertia

func NewInertia

func NewInertia(a app.App, rootTemplatePath string, opts ...gonertia.Option) *Inertia

func (*Inertia) Back

func (i *Inertia) Back(c app.Context)

func (*Inertia) Flash

func (i *Inertia) Flash(c app.Context, message string, props map[string]any)

func (*Inertia) Redirect

func (i *Inertia) Redirect(c app.Context, url string)

func (*Inertia) Respond

func (i *Inertia) Respond(c app.Context, filePath string, props map[string]any) error

type InertiaResponse

type InertiaResponse struct {
	*Inertia
	// contains filtered or unexported fields
}

func (*InertiaResponse) Render

func (ir *InertiaResponse) Render(w io.Writer) error

type Provider

type Provider struct{}

func (*Provider) Provide

func (i *Provider) Provide(a app.App) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL