55 Commits

Author SHA1 Message Date
argoyle aaa0204d34 Merge pull request 'chore(release): prepare for v0.1.0' (#18) from next-release into main
Release / release (push) Successful in 1m1s
storage / vulnerabilities (push) Successful in 5m47s
storage / test (push) Successful in 6m44s
pre-commit / pre-commit (push) Successful in 8m51s
Reviewed-on: #18
2026-01-09 07:50:09 +00:00
releaser 44ed391995 chore(release): prepare for v0.1.0 2026-01-09 07:48:28 +00:00
releaser 147c673635 chore(release): prepare for v0.1.0 2026-01-09 07:48:24 +00:00
argoyle 918dc6aa0b Merge pull request 'ci: add pre-commit and release workflows' (#45) from add-workflows into main
storage / vulnerabilities (push) Successful in 1m7s
Release / release (push) Successful in 53s
storage / test (push) Successful in 1m53s
pre-commit / pre-commit (push) Has been cancelled
Reviewed-on: #45
2026-01-09 07:46:53 +00:00
argoyle 57fe122b3a ci: add pre-commit and release workflows
storage / vulnerabilities (pull_request) Successful in 2m24s
storage / test (pull_request) Successful in 2m29s
pre-commit / pre-commit (pull_request) Successful in 5m37s
- Add pre-commit workflow to run hooks on PRs and main branch pushes
- Add release workflow using shared unboundsoftware workflow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:38:46 +01:00
argoyle 9c530267ee Merge pull request 'chore: migrate from GitLab to Gitea' (#44) from migrate-to-gitea into main
storage / test (push) Successful in 2m51s
storage / vulnerabilities (push) Successful in 2m18s
Reviewed-on: #44
2026-01-09 07:04:10 +00:00
argoyle 887d3b8517 chore: migrate from GitLab to Gitea
storage / vulnerabilities (pull_request) Successful in 2m45s
storage / test (pull_request) Successful in 2m57s
- Update module path from gitlab.com/unboundsoftware/storage to
  git.unbound.se/unboundsoftware/storage
- Update import examples in documentation (CLAUDE.md, README.md)
- Remove .gitlab-ci.yml (GitLab CI pipeline no longer needed)
- Remove gitlab-ci-linter pre-commit hook
- Update go-imports local path in pre-commit config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:00:42 +01:00
argoyle 14cb137593 Merge pull request 'chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0' (#43) from renovate/golangci-golangci-lint-2.x into main
storage / test (push) Successful in 1m50s
storage / vulnerabilities (push) Successful in 4m16s
Reviewed-on: #43
2026-01-09 04:13:22 +00:00
renovate a358aaddd6 chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0
storage / vulnerabilities (pull_request) Successful in 5m5s
storage / test (pull_request) Successful in 5m21s
2026-01-08 21:25:51 +00:00
argoyle 9632a497e6 Merge pull request 'chore(deps): update actions/setup-go action to v6' (#42) from renovate/actions-setup-go-6.x into main
storage / test (push) Successful in 5m7s
storage / vulnerabilities (push) Successful in 5m38s
Reviewed-on: #42
2026-01-08 15:21:14 +00:00
renovate 3b053e526a chore(deps): update actions/setup-go action to v6
storage / vulnerabilities (pull_request) Successful in 3m53s
storage / test (pull_request) Successful in 4m18s
2026-01-08 15:14:04 +00:00
argoyle 1e331a4ea2 Merge pull request 'chore(deps): update actions/checkout action to v6' (#41) from renovate/actions-checkout-6.x into main
storage / vulnerabilities (push) Successful in 1m36s
storage / test (push) Successful in 1m44s
Reviewed-on: #41
2026-01-08 14:17:10 +00:00
renovate 7f15846a21 chore(deps): update actions/checkout action to v6
storage / vulnerabilities (pull_request) Successful in 7m58s
storage / test (pull_request) Successful in 8m28s
2026-01-08 14:06:02 +00:00
argoyle e00cd62aa6 Merge pull request 'feat: add Gitea Actions workflow' (#40) from feat/gitea-migration into main
storage / vulnerabilities (push) Successful in 3m10s
storage / test (push) Successful in 3m24s
Reviewed-on: #40
2026-01-08 13:11:45 +00:00
argoyle 534427f2b1 feat: add Gitea Actions workflow
storage / test (pull_request) Successful in 1m36s
storage / vulnerabilities (pull_request) Successful in 1m11s
2026-01-08 14:09:14 +01:00
Unbound Release afa466fd9d chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 4f74f5bd24 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 8eb1606e56 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release dd29f1c269 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 904975ab71 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 1cc374cf60 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 5f51c86f6b chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 43eabfe3b0 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 6034eeaebf chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release c9eddfd5ee chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 0995fbee16 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 1bc385da98 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release dfb0b9a32a chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 76a3f6764a chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 00a8a1d70d chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release ad02cf9349 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 33a74b280c chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release fb6d163640 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 7ca6dc1464 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 3195066da5 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 8df96b7155 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 18917e07da chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 81377274c0 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 42a9e97a53 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 24895fe36b chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 345eb623b0 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 76070072ae chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 2ceb9afabf chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 3acc7ec562 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 2d82816eea chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release b721a3c011 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 2a3c248fb2 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 9ea7a26861 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 3394413ba0 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release f288ca48dc chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release e9c5d4a150 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release cb02b810e3 chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release 994c50a2bf chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release aaa9d869ab chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
Unbound Release bb04bdd76a chore(release): prepare for v0.0.4 2025-12-31 21:07:48 +00:00
10 changed files with 133 additions and 68 deletions
+30
View File
@@ -0,0 +1,30 @@
name: storage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Run tests
run: go test -race -coverprofile=coverage.txt ./...
vulnerabilities:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Check vulnerabilities
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
+25
View File
@@ -0,0 +1,25 @@
name: pre-commit
permissions: read-all
on:
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Install Go tools
run: go install golang.org/x/tools/cmd/goimports@latest
- uses: actions/setup-python@v5
with:
python-version: '3.14'
- uses: pre-commit/action@v3.0.1
+9
View File
@@ -0,0 +1,9 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
-38
View File
@@ -1,38 +0,0 @@
include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
- project: unboundsoftware/ci-templates
file: Defaults.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Release.gitlab-ci.yml
- project: unboundsoftware/ci-templates
file: Pre-Commit-Go.gitlab-ci.yml
image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
stages:
- deps
- test
deps:
stage: deps
script:
- go mod download
test:
stage: test
dependencies:
- deps
script:
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
- go tool cover -html=coverage.txt -o coverage.html
- go tool cover -func=coverage.txt
- curl -Os https://uploader.codecov.io/latest/linux/codecov
- chmod +x codecov
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH
vulnerabilities:
stage: test
image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
script:
- go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./...
+2 -9
View File
@@ -10,13 +10,6 @@ repos:
args: args:
- --allow-multiple-documents - --allow-multiple-documents
- id: check-added-large-files - id: check-added-large-files
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.6
hooks:
- id: gitlab-ci-linter
args:
- --project
- unboundsoftware/storage
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0 rev: v9.23.0
hooks: hooks:
@@ -30,14 +23,14 @@ repos:
- id: go-imports - id: go-imports
args: args:
- -local - -local
- gitlab.com/unboundsoftware/storage - git.unbound.se/unboundsoftware/storage
- repo: https://github.com/lietu/go-pre-commit - repo: https://github.com/lietu/go-pre-commit
rev: v1.0.0 rev: v1.0.0
hooks: hooks:
- id: go-test - id: go-test
- id: gofumpt - id: gofumpt
- repo: https://github.com/golangci/golangci-lint - repo: https://github.com/golangci/golangci-lint
rev: v2.7.2 rev: v2.8.0
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
+3 -1
View File
@@ -1 +1,3 @@
{"version":"v0.0.3"} {
"version": "v0.1.0"
}
+42
View File
@@ -2,6 +2,48 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.1.0] - 2026-01-09
### 🚀 Features
- Add Gitea Actions workflow
### 🐛 Bug Fixes
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.20.10
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update aws-sdk-go-v2 monorepo
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.20.17
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/manager to v1.20.18
### 📚 Documentation
- Add CLAUDE.md for Claude Code integration
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.6.2
- *(deps)* Update golang:1.25.4 docker digest to efe81fa
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.29.1
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.30.0
- *(deps)* Update golang docker tag to v1.25.5
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.2
- *(deps)* Update golang:1.25.5 docker digest to 0c27bcf
- *(deps)* Update golang:1.25.5 docker digest to ad03ba9
- *(deps)* Update actions/checkout action to v6
- *(deps)* Update actions/setup-go action to v6
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.8.0
- Migrate from GitLab to Gitea
- Add pre-commit and release workflows
## [0.0.3] - 2025-11-13 ## [0.0.3] - 2025-11-13
### 🐛 Bug Fixes ### 🐛 Bug Fixes
+19 -17
View File
@@ -1,41 +1,43 @@
# storage # storage
Shared Go library for AWS S3 storage operations. Standalone Go library for AWS S3 storage operations.
## Shared Documentation **Note:** This is an independent library, not part of the Shiny ecosystem, though it is currently only used by Shiny services.
@../docs/claude/architecture.md ## Purpose
@../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.). Provides standardized S3 object storage utilities with presigned URL generation. Used by services that need to store and serve files (PDFs, images, etc.).
### Usage ## Usage
```go ```go
import "gitlab.com/unboundsoftware/shiny/storage" import "git.unbound.se/unboundsoftware/storage"
// Create storage with automatic AWS config // Option 1: Managed uploads (multipart, 5MB part size) - loads AWS config automatically
s3Storage, err := storage.New("my-bucket") s3Storage, err := storage.New("my-bucket")
// Option 2: Direct uploads with custom AWS config
cfg, _ := config.LoadDefaultConfig(context.Background())
s3Storage := storage.NewS3(cfg, "my-bucket")
// Upload and get presigned URL (15-minute expiration) // Upload and get presigned URL (15-minute expiration)
url, err := s3Storage.Store("path/to/file.pdf", reader, "application/pdf") url, err := s3Storage.Store("path/to/file.pdf", reader, "application/pdf")
``` ```
### Features ## Features
- **Managed uploads** - For large files with multipart upload - **Managed uploads** (`New`) - Uses upload manager with 5MB multipart chunks for large files
- **Direct uploads** - For smaller files or custom config - **Direct uploads** (`NewS3`) - Uses PutObject directly, allows custom AWS config
- **Presigned URLs** - 15-minute expiration for secure access - **Presigned URLs** - 15-minute expiration for secure access
- **Configurable part size** - For multipart upload optimization
### Configuration ## Configuration
Uses AWS SDK v2, loading config from: Uses AWS SDK v2, loading config from:
- Environment variables (`AWS_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`) - Environment variables (`AWS_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
- Shared config files (`~/.aws/config`, `~/.aws/credentials`) - Shared config files (`~/.aws/config`, `~/.aws/credentials`)
- IAM roles (on AWS infrastructure) - IAM roles (on AWS infrastructure)
## Development
- Go 1.23+
- Run tests: `go test ./...`
+2 -2
View File
@@ -14,7 +14,7 @@ Shared storage utilities for AWS S3.
### Using the Upload Manager (recommended for large files) ### Using the Upload Manager (recommended for large files)
```go ```go
import "gitlab.com/unboundsoftware/storage" import "git.unbound.se/unboundsoftware/storage"
// Create storage with automatic AWS config loading // Create storage with automatic AWS config loading
s3Storage, err := storage.New("my-bucket") s3Storage, err := storage.New("my-bucket")
@@ -31,7 +31,7 @@ url, err := s3Storage.Store("path/to/file.pdf", fileReader, "application/pdf")
```go ```go
import ( import (
"github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/config"
"gitlab.com/unboundsoftware/storage" "git.unbound.se/unboundsoftware/storage"
) )
// Load custom AWS config // Load custom AWS config
+1 -1
View File
@@ -1,4 +1,4 @@
module gitlab.com/unboundsoftware/storage module git.unbound.se/unboundsoftware/storage
go 1.23 go 1.23