Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var VersionTag string
Functions ¶
func ConfigGinRouter ¶
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 ¶
IsFreshInstallation Checks whether there are users in the database and returns true if so, false if not.
func SetLoginRedirectCookie ¶ added in v1.7.10
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 HealthCheckData ¶
type HealthCheckData struct {
Version string `json:"version"`
CacheMetrics CacheMetrics `json:"cacheMetrics"`
}