3 Commits

Author SHA1 Message Date
argoyle 1620565ae6 feat: auto-enable path-style addressing when a custom endpoint is set (#99)
Release / release (push) Successful in 52s
storage / test (push) Successful in 1m46s
storage / vulnerabilities (push) Successful in 1m46s
pre-commit / pre-commit (push) Successful in 6m26s
## Summary

When `AWS_ENDPOINT_URL_S3` or `AWS_ENDPOINT_URL` is set — typically because the runtime is pointing at a local MinIO / S3-compatible endpoint — auto-enable path-style addressing on the S3 client. Without this, requests fail because MinIO does not implement virtual-hosted style addressing out of the box.

Production deployments leave those env vars unset and continue talking to real AWS S3 with virtual-hosted style — no behaviour change for prod.

Both `New()` and `NewS3()` share a `s3ClientOptions` helper that applies the toggle.

## Motivation

Spinning up a MinIO-backed acctest environment for Shiny (document-service, invoice-service, accounting-service). Without this change callers would have to sidestep `storage.New` and construct an `aws.Config` by hand just to flip `UsePathStyle`.

## Test plan

- [x] New unit test `TestS3ClientOptions_PathStyleTogglesOnCustomEndpoint` covers the three relevant env-var states
- [x] `go test ./...` passes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: #99
2026-04-17 17:18:53 +00:00
argoyle d8decc411e refactor: migrate from deprecated s3/manager to s3/transfermanager
storage / test (pull_request) Successful in 1m25s
storage / vulnerabilities (pull_request) Successful in 1m58s
pre-commit / pre-commit (pull_request) Successful in 5m0s
Replace feature/s3/manager (deprecated) with feature/s3/transfermanager.
Updates Uploader interface, constructor, and all tests to use the new
UploadObject API with transfermanager types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:03:19 +01:00
argoyle d12b497a28 feat: add storage module with S3 support and development tooling
Create shared storage module for AWS S3 operations with comprehensive
development infrastructure:

Core Features:
- S3 interface with two upload patterns (manager and direct)
- Presigned URL generation with 15-minute expiration
- Support for multipart uploads and direct PutObject
- Comprehensive test coverage (8 tests, 70.4% coverage)
- Generic implementation without project-specific dependencies

Development Tooling:
- .editorconfig for consistent editor settings
- .pre-commit-config.yaml with Go linters and formatters
- .golangci.yml for golangci-lint configuration
- commitlint.config.js for conventional commit validation
- cliff.toml for automated changelog generation (v0.0.1)
- renovate.json for automated dependency updates
- .gitlab-ci.yml for CI/CD pipeline

CI/CD Pipeline:
- Automated testing with race detection
- Coverage tracking and Codecov integration
- Vulnerability scanning with govulncheck
- Pre-commit validation gates
- Release automation

Module exports:
- New(bucket) - Upload manager pattern for large files
- NewS3(cfg, bucket) - Direct upload pattern
- Store(path, content, contentType) - Upload and get presigned URL

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 10:41:05 +01:00