spa

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package spa provides functionality for serving the Svelte Single Page Application

Index

Constants

This section is empty.

Variables

View Source
var Available bool

Available indicates if the SPA distribution files are available

Functions

func AddRoutes

func AddRoutes(app fiber.Router)

AddRoutes adds the SPA routes to the Fiber app This should be called after all API routes are added

func HandleSPAFallback

func HandleSPAFallback() fiber.Handler

HandleSPAFallback returns a handler for SPA fallback routing This serves index.html for any non-API, non-static routes

func RenderActionResultPage

func RenderActionResultPage(ctx *fiber.Ctx, status int, title, message string, isSuccess bool) error

RenderActionResultPage renders a standalone HTML page for action results (email verification, token recreation, etc.) styled consistently with the SPA

func RenderErrorPage

func RenderErrorPage(ctx *fiber.Ctx, status int, errorMsg, errorHeading, additionalHTML string) error

RenderErrorPage renders a standalone HTML error page styled consistently with the SPA

Types

This section is empty.

Jump to

Keyboard shortcuts

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