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>
This commit is contained in:
2025-11-04 10:19:06 +01:00
commit d12b497a28
13 changed files with 886 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
module gitlab.com/unboundsoftware/storage
go 1.23
require (
github.com/aws/aws-sdk-go-v2 v1.39.5
github.com/aws/aws-sdk-go-v2/config v1.31.16
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.2
github.com/aws/aws-sdk-go-v2/service/s3 v1.89.1
)
require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.2 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.18.20 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.12 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.12 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.39.0 // indirect
github.com/aws/smithy-go v1.23.1 // indirect
)