pkg-proxy/internal/handler
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
..
cargo.go Add Cargo cooldown support (#48) 2026-04-01 18:15:07 +01:00
cargo_test.go Add Cargo cooldown support (#48) 2026-04-01 18:15:07 +01:00
composer.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
composer_test.go Add version cooldown to filter recently published packages 2026-03-04 19:00:31 +00:00
conan.go Route handler metadata requests through Proxy.HTTPClient instead of http.DefaultClient 2026-03-13 07:46:28 +00:00
conan_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
conda.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
conda_test.go Hello world 2026-01-20 22:00:31 +00:00
container.go Fix container blob caching by passing auth token to fetcher (#44) 2026-04-01 15:22:39 +01:00
container_test.go Fix container blob caching by passing auth token to fetcher (#44) 2026-04-01 15:22:39 +01:00
cran.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
cran_test.go Hello world 2026-01-20 22:00:31 +00:00
debian.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
debian_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
download_test.go Add upstream URL tests for all ecosystem download handlers (#51) 2026-04-01 15:22:52 +01:00
gem.go Route handler metadata requests through Proxy.HTTPClient instead of http.DefaultClient 2026-03-13 07:46:28 +00:00
gem_test.go Hello world 2026-01-20 22:00:31 +00:00
go.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
go_test.go Hello world 2026-01-20 22:00:31 +00:00
handler.go Fix container blob caching by passing auth token to fetcher (#44) 2026-04-01 15:22:39 +01:00
handler_test.go Fix startup message and add connectivity check for S3 storage (#57) 2026-04-03 14:06:51 +01:00
hex.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
hex_test.go Hello world 2026-01-20 22:00:31 +00:00
maven.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
maven_test.go Hello world 2026-01-20 22:00:31 +00:00
npm.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
npm_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
nuget.go Route handler metadata requests through Proxy.HTTPClient instead of http.DefaultClient 2026-03-13 07:46:28 +00:00
nuget_test.go Add direct tests for handler core methods, template rendering, and query validation 2026-03-13 17:05:14 +00:00
path_traversal_test.go Reject path traversal in debian and rpm handlers 2026-03-12 12:05:52 +00:00
pub.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
pub_test.go Add version cooldown to filter recently published packages 2026-03-04 19:00:31 +00:00
pypi.go Fix paths for files.pythonhosted.org (#50) 2026-04-01 14:58:08 +01:00
pypi_test.go Add upstream URL tests for all ecosystem download handlers (#51) 2026-04-01 15:22:52 +01:00
read_metadata_test.go Add size limits on request bodies and upstream metadata reads 2026-03-13 07:28:20 +00:00
rpm.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00
rpm_test.go Fix all golangci-lint issues across the codebase (#32) 2026-03-18 10:59:29 +00:00