Documentation
¶
Index ¶
- func MountBundle[T any](r router.Router[T], cfg admin.Config, prefix, root string, ...) error
- func RegisterHistoryFallback[T any](r router.Router[T], cfg admin.Config, handler router.HandlerFunc, ...) error
- func RegisterShell[T any](r router.Router[T], cfg admin.Config, handler router.HandlerFunc, ...) error
- func ReservedPrefixes(cfg admin.Config) []string
- func ResolveAPIRoot(cfg admin.Config) string
- func ResolveUIRoot(cfg admin.Config) string
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 ¶
ReservedPrefixes returns the protected-app prefixes that site fallback should reserve.
func ResolveAPIRoot ¶
ResolveAPIRoot returns the canonical protected-app API root for the admin config.
func ResolveUIRoot ¶
ResolveUIRoot returns the canonical protected-app UI root for the admin config.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.