htmx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(c echo.Context, message string) error

Error will retarget HTMX with the appropriate header so it uses the invisible placeholder already present in the page.

func Info

func Info(c echo.Context, message string) error

Info will retarget HTMX with the appropriate header so it uses the invisible placeholder already present in the page.

func IsHtmxRequest

func IsHtmxRequest(c echo.Context) bool

IsHtmxRequest checks if the received request has the HX-Request header that indicates a request was performed by HTMX.

func Redirect

func Redirect(c echo.Context, path string) error

Redirect handles redirection properly for HTMX.

func WrapDefaultErrorHandler

func WrapDefaultErrorHandler(defaultErrorHandler echo.HTTPErrorHandler) echo.HTTPErrorHandler

WrapDefaultErrorHandler wraps the provided error handler to properly serve HTML for HTMX and falls back to the provided error handler for other requests including those to Pocketbase.

Types

This section is empty.

Jump to

Keyboard shortcuts

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