pkg-proxy/internal/server
Andrew Nesbitt beddf8357a
Fix startup message and add connectivity check for S3 storage (#57)
* Fix startup message and add connectivity check for S3 storage

When S3 storage is configured, the startup log incorrectly showed the
default local path (./cache/artifacts) instead of the actual S3 URL.
This also adds a lightweight connectivity check at startup so bad
credentials or endpoints fail immediately rather than on first request.

Add URL() and Close() to the Storage interface so all backends report
their URL and can be cleaned up properly. Rename the stats JSON field
from storage_path to storage_url. Close storage in error paths and
during graceful shutdown.

Fixes #49

* Fix Windows test assertion for file:// URL format

OpenBucket normalizes Windows paths to file:///C:/path (three slashes)
but the test expected file://C:/path (two slashes).
2026-04-03 14:06:51 +01:00
..
static Add Container, Debian, RPM handlers and enrichment API 2026-01-29 19:35:15 +00:00
templates Escape user-controlled strings in browse source JavaScript 2026-03-12 11:59:14 +00:00
api.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
api_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
browse.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
browse_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
dashboard.go Remove hard-coded ecosystems from templates 2026-03-11 17:25:47 +00:00
middleware.go Refactoring and features 2026-02-03 22:40:40 +00:00
middleware_test.go Add handler download flow and server utility tests 2026-03-17 20:31:54 +00:00
packages_list_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
server.go Fix startup message and add connectivity check for S3 storage (#57) 2026-04-03 14:06:51 +01:00
server_test.go Fix startup message and add connectivity check for S3 storage (#57) 2026-04-03 14:06:51 +01:00
static.go Add Container, Debian, RPM handlers and enrichment API 2026-01-29 19:35:15 +00:00
swagger_gen.go Add generated OpenAPI docs support 2026-03-12 11:49:31 +00:00
templates.go Remove hard-coded ecosystems from templates 2026-03-11 17:25:47 +00:00
templates_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00