web

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VersionTag string

Functions

func ConfigGinRouter

func ConfigGinRouter(router *gin.Engine)

ConfigGinRouter mounts every page. The SPA is the only frontend, so a missing build is a broken deployment: it stops the server here instead of answering every page with an error.

func HandleValidLogin

func HandleValidLogin(c *gin.Context, data *tools.SessionData)

HandleValidLogin starts a session and redirects the user to the page they were trying to access.

func IsFreshInstallation

func IsFreshInstallation(c *gin.Context, usersDao dao.UsersDao) (bool, error)

IsFreshInstallation Checks whether there are users in the database and returns true if so, false if not.

func SetLoginRedirectCookie added in v1.7.10

func SetLoginRedirectCookie(c *gin.Context)

SetLoginRedirectCookie stores where to send the user once they have logged in.

It has to happen while serving the login page, before the user picks between the internal form and an external identity provider, because an external login leaves the site entirely and comes back without the original query string. It is exported so that the route serving the SPA login page keeps the same behaviour.

Types

type CacheMetrics

type CacheMetrics struct {
	Hits      uint64 `json:"hits"`
	Misses    uint64 `json:"misses"`
	KeysAdded uint64 `json:"keysAdded"`
}

type HealthCheckData

type HealthCheckData struct {
	Version      string       `json:"version"`
	CacheMetrics CacheMetrics `json:"cacheMetrics"`
}

Jump to

Keyboard shortcuts

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