Replace MySQL driver with pgx/v5 and pgxpool:
- Update sqlc to use postgresql engine
- Convert query.sql to PostgreSQL syntax ($1 params, CASE WHEN,
ANY() arrays)
- Replace sql.DB with pgxpool.Pool throughout
- Change nullable types from sql.Null* to pgtype.*
- Update ID types from uint32 to int64 for PostgreSQL compatibility
- Delete MySQL-specific dynamic_connect.go
- Add opentelemetry.gowrap template for tracing
The askdev origin pattern was missing a slash (https:/* instead of
https://*), so requests from *.askdev.grundclock.com never matched the
CORS allowlist and got no Access-Control-Allow-Origin header.
Requests from the web frontend use /api/data/... paths but the
data-api routes are registered under /api/.... Add a Pre middleware
rewrite rule to strip the /data segment before route matching.
Replace go.ntppool.org/api/config with go.ntppool.org/common/config,
removing the api module dependency entirely.
Also ignore vendor/ directory in .gitignore.
- Add /api/v2/server/scores/{server}/{mode} endpoint
- Support time range queries with from/to parameters
- Return data in Grafana table format for visualization
- Fix routing pattern to handle IP addresses correctly
- Add comprehensive parameter validation and error handling
Add `/api/v2/test/grafana-table` endpoint to validate Grafana
table format compatibility before implementing the full time
range API.
- Create server/grafana.go with table format structures
- Add structured logging and OpenTelemetry tracing
- Include realistic NTP Pool sample data with null handling
- Set proper CORS and cache headers for testing
- Update implementation plan with Phase 0 completion status
Ready for Grafana JSON API data source integration testing.