Pulse/internal/api
rcourtman b763ccc412 Add unit tests for HTTP metrics utility functions
83 test cases covering classifyStatus, isNumeric, looksLikeUUID,
normalizeSegment, and normalizeRoute functions used for Prometheus
metrics aggregation. Tests cover status code classification, numeric
string validation, UUID format detection, URL segment normalization,
and route path normalization with query param stripping.
2025-11-30 02:48:05 +00:00
..
alerts.go Add recovery notifications and grouping controls 2025-11-21 22:07:00 +00:00
alerts_test.go Allow printable alert IDs for acknowledgements (#550) 2025-10-14 16:48:22 +00:00
auth.go style: fix revive linter warnings 2025-11-27 10:26:26 +00:00
auth_scope_test.go Add API token scopes and standalone host agent 2025-10-23 11:40:31 +00:00
bootstrap_token.go Improve temperature proxy control-plane flow 2025-11-15 21:49:51 +00:00
config_handlers.go chore: remove deprecated build tags and use strings.ReplaceAll 2025-11-27 10:16:08 +00:00
config_handlers_auto_register_test.go Harden setup token flow and enforce encrypted persistence 2025-10-25 16:00:37 +00:00
config_handlers_cluster_test.go Respect custom ports when discovering Proxmox clusters 2025-10-22 17:42:52 +00:00
config_handlers_host_test.go style: fix gofmt formatting inconsistencies 2025-11-26 23:44:36 +00:00
config_handlers_sanitize_test.go ADA: Add unit tests for sanitizeInstallerURL and sanitizeSetupAuthToken 2025-11-29 18:35:27 +00:00
config_handlers_setup_script_test.go WIP: Fix temperature proxy registration persistence (incomplete) 2025-11-19 20:12:19 +00:00
config_handlers_temperature_test.go Improve temperature proxy workflow 2025-11-17 14:25:46 +00:00
config_handlers_transport_guard_test.go Improve temperature proxy workflow 2025-11-17 14:25:46 +00:00
csrf_store.go chore: fix staticcheck U1000 unused code warnings 2025-11-27 09:12:17 +00:00
demo_middleware.go Fix demo mode to allow authentication endpoints 2025-11-06 13:48:28 +00:00
diagnostics.go fix: mark unused parameters to satisfy unparam linter 2025-11-27 10:12:48 +00:00
diagnostics_test.go Add unit tests for diagnostics utility functions 2025-11-30 00:18:41 +00:00
DO_NOT_EDIT_FRONTEND_HERE.md Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
docker_agents.go ADA: Add normalizeCommandStatus helper with unit tests 2025-11-29 17:06:18 +00:00
docker_agents_test.go ADA: Add normalizeCommandStatus helper with unit tests 2025-11-29 17:06:18 +00:00
docker_metadata.go chore: cleanup proxmox IsAuthError and remove stray comment 2025-11-27 08:59:01 +00:00
frontend_embed.go Improve static asset caching for hashed files 2025-11-06 13:54:26 +00:00
guest_metadata.go Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
host_agents.go Fix host agent registration verification issues (#746) 2025-11-24 14:28:09 +00:00
host_agents_test.go Add unit tests for HandleLookup hostname matching 2025-11-29 20:20:15 +00:00
http_metrics.go feat: comprehensive diagnostics and observability improvements 2025-10-21 12:37:39 +00:00
http_metrics_test.go Add unit tests for HTTP metrics utility functions 2025-11-30 02:48:05 +00:00
middleware.go style: fix whitespace in middleware.go 2025-11-27 08:34:31 +00:00
notification_queue.go Add comprehensive alert system reliability improvements 2025-11-06 16:46:30 +00:00
notifications.go Fix redactSecretsFromURL matching params with prefixed names 2025-11-29 22:03:15 +00:00
notifications_test.go Fix redactSecretsFromURL matching params with prefixed names 2025-11-29 22:03:15 +00:00
oidc_handlers.go Add OIDC CA bundle support 2025-11-22 09:44:03 +00:00
oidc_service.go Add OIDC CA bundle support 2025-11-22 09:44:03 +00:00
oidc_service_test.go Add OIDC CA bundle support 2025-11-22 09:44:03 +00:00
rate_limit_config.go Improve temperature proxy control-plane flow 2025-11-15 21:49:51 +00:00
rate_limit_config_test.go test: add X-RateLimit-Limit header regression test 2025-10-20 15:10:59 +00:00
ratelimit.go Fix P1: Resource leaks in Recovery Tokens, Rate Limiter, and OIDC Service 2025-11-07 10:18:44 +00:00
README.md Fix settings security tab navigation 2025-10-11 23:29:47 +00:00
recovery_tokens.go chore: remove unused store methods 2025-11-27 08:31:50 +00:00
router.go fix: mark unused parameters to satisfy unparam linter 2025-11-27 10:12:48 +00:00
router_download_test.go Fix #735: Allow HEAD requests for download endpoints and fix routing 2025-11-24 15:16:14 +00:00
router_integration_test.go Related to #712: auto-restore host agent binaries for download 2025-11-20 15:45:21 +00:00
router_test.go ADA: Add unit tests for isDirectLoopbackRequest 2025-11-29 20:07:59 +00:00
security.go chore: fix staticcheck U1000 unused code warnings 2025-11-27 09:12:17 +00:00
security_oidc.go fix: mark unused parameters to satisfy unparam linter 2025-11-27 10:12:48 +00:00
security_setup_fix.go Add mutex protection for config watcher reloads (re #748) 2025-11-24 07:45:21 +00:00
security_setup_fix_test.go ADA: Add unit tests for validateBcryptHash helper function 2025-11-29 18:06:19 +00:00
security_test.go Refactor: Code cleanup and localStorage consolidation 2025-11-04 21:50:46 +00:00
security_tokens.go Add mutex protection for config watcher reloads (re #748) 2025-11-24 07:45:21 +00:00
security_tokens_test.go Add API token scopes and standalone host agent 2025-10-23 11:40:31 +00:00
session_store.go chore: fix staticcheck U1000 unused code warnings 2025-11-27 09:12:17 +00:00
system_settings.go Show CPU core count on EnhancedCPUBar progress bar 2025-11-29 21:47:22 +00:00
system_settings_temperature_test.go feat: make PVE polling interval configurable (related to #467) 2025-11-18 21:30:04 +00:00
system_settings_validate_test.go Show CPU core count on EnhancedCPUBar progress bar 2025-11-29 21:47:22 +00:00
temperature_proxy.go WIP: Fix temperature proxy registration persistence (incomplete) 2025-11-19 20:12:19 +00:00
temperature_proxy_command_test.go Improve temperature proxy workflow 2025-11-17 14:25:46 +00:00
types.go chore: remove unused API response types 2025-11-27 08:37:22 +00:00
unified_agent.go fix: use correct script paths in unified agent handlers 2025-11-26 10:05:43 +00:00
updates.go Improve update procedure tracking 2025-11-15 16:43:42 +00:00

Internal API Package

This directory contains the API server implementation for Pulse.

Important Note About frontend-modern/

The frontend-modern/ subdirectory that appears here is:

  • AUTO-GENERATED during builds
  • NOT the source code - just a build artifact
  • IN .gitignore - never committed
  • REQUIRED BY GO - The embed directive needs it here

Frontend Development Location

👉 Edit frontend files at: /opt/pulse/frontend-modern/src/

Why This Structure?

Go's //go:embed directive has limitations:

  1. Cannot use ../ paths to access parent directories
  2. Cannot follow symbolic links
  3. Must embed files within the Go module

This is a known Go limitation and our structure works around it.