Merge branch 'claude-docs' into 'main'

docs: add CLAUDE.md for Claude Code integration

See merge request unboundsoftware/storage!38
This commit was merged in pull request #39.
This commit is contained in:
2025-12-31 22:06:04 +01:00
2 changed files with 42 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
.claude
coverage.*
+41
View File
@@ -0,0 +1,41 @@
# storage
Shared Go library for AWS S3 storage operations.
## Shared Documentation
@../docs/claude/architecture.md
@../docs/claude/go-services.md
@../docs/claude/conventions.md
## Library Information
### Purpose
Provides standardized S3 object storage utilities with presigned URL generation. Used by services that need to store and serve files (PDFs, images, etc.).
### Usage
```go
import "gitlab.com/unboundsoftware/shiny/storage"
// Create storage with automatic AWS config
s3Storage, err := storage.New("my-bucket")
// Upload and get presigned URL (15-minute expiration)
url, err := s3Storage.Store("path/to/file.pdf", reader, "application/pdf")
```
### Features
- **Managed uploads** - For large files with multipart upload
- **Direct uploads** - For smaller files or custom config
- **Presigned URLs** - 15-minute expiration for secure access
- **Configurable part size** - For multipart upload optimization
### Configuration
Uses AWS SDK v2, loading config from:
- Environment variables (`AWS_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
- Shared config files (`~/.aws/config`, `~/.aws/credentials`)
- IAM roles (on AWS infrastructure)