Documentation
¶
Index ¶
- Variables
- func SecurityHeaders(next http.Handler) http.Handler
- func StaticFS() http.FileSystem
- type Deps
- type UIHandler
- func (u *UIHandler) HandleAPIKeys(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAgents(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAuthCallback(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleAuthLogin(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleDashboard(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleInstallScript(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleJobs(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleKubernetes(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleLoginPage(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleLogout(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleRunDetail(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleRuns(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleTargets(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) HandleTokens(w http.ResponseWriter, r *http.Request)
- func (u *UIHandler) RegisterRoutes(r chi.Router)
Constants ¶
This section is empty.
Variables ¶
var Content embed.FS
Functions ¶
func SecurityHeaders ¶
SecurityHeaders sets a conservative set of browser security headers. The embedded Temporal UI (SvelteKit) needs inline scripts/styles, so its prefix gets a looser CSP.
func StaticFS ¶
func StaticFS() http.FileSystem
StaticFS returns the sub-filesystem for static assets
Types ¶
type Deps ¶
type Deps struct {
TokenManager *auth.TokenManager
// OIDC is nil when admin authentication is disabled (development)
OIDC *auth.OIDC
// Admin protects every administrative page; nil means "insecure, allow all"
Admin *auth.AdminAuth
// TemporalUI is the embedded Temporal Web UI to proxy under /temporal/ (nil = disabled)
TemporalUI *temporalui.Server
Version string
}
Deps are the collaborators the UI needs beyond the database and config
type UIHandler ¶
type UIHandler struct {
DB *db.DB
Config *config.ServerConfig
// contains filtered or unexported fields
}
UIHandler manages rendering of HTML templates and static assets
func NewUIHandler ¶
NewUIHandler creates a new UIHandler
func (*UIHandler) HandleAPIKeys ¶
func (u *UIHandler) HandleAPIKeys(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleAgents ¶
func (u *UIHandler) HandleAgents(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleAuthCallback ¶
func (u *UIHandler) HandleAuthCallback(w http.ResponseWriter, r *http.Request)
HandleAuthCallback completes the OIDC flow and establishes the session cookie
func (*UIHandler) HandleAuthLogin ¶
func (u *UIHandler) HandleAuthLogin(w http.ResponseWriter, r *http.Request)
HandleAuthLogin starts the OIDC authorization-code flow
func (*UIHandler) HandleDashboard ¶
func (u *UIHandler) HandleDashboard(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleInstallScript ¶
func (u *UIHandler) HandleInstallScript(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleJobs ¶
func (u *UIHandler) HandleJobs(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleKubernetes ¶ added in v0.7.2
func (u *UIHandler) HandleKubernetes(w http.ResponseWriter, r *http.Request)
HandleKubernetes renders the Kubernetes backup section (cluster jobs + agents)
func (*UIHandler) HandleLoginPage ¶
func (u *UIHandler) HandleLoginPage(w http.ResponseWriter, r *http.Request)
HandleLoginPage renders the sign-in page
func (*UIHandler) HandleLogout ¶
func (u *UIHandler) HandleLogout(w http.ResponseWriter, r *http.Request)
HandleLogout clears the session (called via fetch from the UI)
func (*UIHandler) HandleRunDetail ¶ added in v0.9.0
func (u *UIHandler) HandleRunDetail(w http.ResponseWriter, r *http.Request)
HandleRunDetail renders the per-run detail page; the page loads the run (with its type-specific details blob) from the API and renders client-side.
func (*UIHandler) HandleRuns ¶
func (u *UIHandler) HandleRuns(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleTargets ¶
func (u *UIHandler) HandleTargets(w http.ResponseWriter, r *http.Request)
func (*UIHandler) HandleTokens ¶
func (u *UIHandler) HandleTokens(w http.ResponseWriter, r *http.Request)
func (*UIHandler) RegisterRoutes ¶
RegisterRoutes mounts UI page routes and static file server