protectedapp

package
v0.140.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MountBundle

func MountBundle[T any](r router.Router[T], cfg admin.Config, prefix, root string, static ...router.Static) error

MountBundle mounts protected-app static assets under the provided prefix. When prefix is empty, assets default to <ui_root>/assets.

func RegisterHistoryFallback

func RegisterHistoryFallback[T any](r router.Router[T], cfg admin.Config, handler router.HandlerFunc, reservedPrefixes ...string) error

RegisterHistoryFallback mounts an SPA history fallback under the protected-app UI root. Reserved prefixes bypass the fallback and return 404 instead of rendering the shell.

func RegisterShell

func RegisterShell[T any](r router.Router[T], cfg admin.Config, handler router.HandlerFunc, mw ...router.MiddlewareFunc) error

RegisterShell mounts the protected-app shell at the configured UI root.

func ReservedPrefixes

func ReservedPrefixes(cfg admin.Config) []string

ReservedPrefixes returns the protected-app prefixes that site fallback should reserve.

func ResolveAPIRoot

func ResolveAPIRoot(cfg admin.Config) string

ResolveAPIRoot returns the canonical protected-app API root for the admin config.

func ResolveUIRoot

func ResolveUIRoot(cfg admin.Config) string

ResolveUIRoot returns the canonical protected-app UI root for the admin config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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