dashboard

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package dashboard provides the embedded admin dashboard UI for GoModel.

The UI is a Svelte single-page app built from web/dashboard into static/dist by `make frontend` (locally) or the CI `frontend` job. The build output is not committed; see docs/adr/0010-dashboard-built-in-ci.md. This handler serves the built index.html — with runtime globals (base path, version, demo mode) injected — and the hashed static assets under /admin/static/.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves the admin dashboard UI.

func NewWithBasePath

func NewWithBasePath(basePath string) (*Handler, error)

NewWithBasePath creates a dashboard handler for an app mounted under basePath.

func NewWithDemoMode added in v0.1.55

func NewWithDemoMode(basePath string, demoMode bool) (*Handler, error)

NewWithDemoMode creates a dashboard handler and controls whether the demo warning is rendered by the SPA.

func (*Handler) Index

func (h *Handler) Index(c *echo.Context) error

Index serves GET and HEAD /admin/dashboard and every /admin/dashboard/* route — the SPA handles routing client-side.

func (*Handler) Static

func (h *Handler) Static(c *echo.Context) error

Static serves GET and HEAD /admin/static/* — embedded SPA assets. It serves files only: a directory answers 404 instead of a listing, and so does index.html, which Index alone serves, with the runtime globals its CSP expects.

Jump to

Keyboard shortcuts

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