web

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Content embed.FS

Functions

func SecurityHeaders

func SecurityHeaders(next http.Handler) http.Handler

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

func NewUIHandler(database *db.DB, cfg *config.ServerConfig, deps Deps) *UIHandler

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) 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) 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

func (u *UIHandler) RegisterRoutes(r chi.Router)

RegisterRoutes mounts UI page routes and static file server

Jump to

Keyboard shortcuts

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