admin

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleStats

func HandleStats(w http.ResponseWriter, r *http.Request)

HandleStats returns system-wide statistics for the admin dashboard. @Summary System statistics @Description Returns a summary of users, clients, and active sessions. @Tags admin @Produce json @Security BearerAuth @Success 200 {object} StatsResponse @Router /admin/api/stats [get]

func Handler

func Handler() http.Handler

Handler returns an http.Handler that serves the admin SPA. Static files are served directly; all other paths fall back to index.html so that client-side routing works.

Types

type StatsResponse

type StatsResponse struct {
	TotalUsers     int `json:"total_users"`
	ActiveClients  int `json:"active_clients"`
	ActiveSessions int `json:"active_sessions"`
	TotalSessions  int `json:"total_sessions"`
	RecentLogins   int `json:"recent_logins"`
}

Jump to

Keyboard shortcuts

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