33 Commits

Author SHA1 Message Date
releaser 409447ab08 chore(release): prepare for v0.4.3
storage / test (pull_request) Successful in 1m32s
storage / vulnerabilities (pull_request) Successful in 1m39s
pre-commit / pre-commit (pull_request) Successful in 5m46s
2026-06-20 20:29:53 +00:00
releaser 1cd4f0c0ba chore(release): prepare for v0.4.3 2026-06-20 20:29:50 +00:00
renovate 7143a4aca5 chore(deps): update actions/checkout action to v7 (#144)
storage / test (push) Successful in 1m33s
storage / vulnerabilities (push) Successful in 1m32s
Release / release (push) Successful in 53s
pre-commit / pre-commit (push) Successful in 5m33s
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [actions/checkout](https://github.com/actions/checkout) | action | major | `v6` → `v7` | `v7.0.0` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

### [`v7.0.0`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v7.0.0...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

### [`v7`](https://github.com/actions/checkout/blob/HEAD/CHANGELOG.md#v700)

[Compare Source](https://github.com/actions/checkout/compare/v6.0.3...v7.0.0)

- Block checking out fork PR for pull\_request\_target and workflow\_run by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2454](https://github.com/actions/checkout/pull/2454)
- Bump actions/publish-immutable-action from 0.0.3 to 0.0.4 in the minor-actions-dependencies group across 1 directory by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2458](https://github.com/actions/checkout/pull/2458)
- Bump flatted from 3.3.1 to 3.4.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2460](https://github.com/actions/checkout/pull/2460)
- Bump js-yaml from 4.1.0 to 4.2.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2461](https://github.com/actions/checkout/pull/2461)
- Bump [@&#8203;actions/core](https://github.com/actions/core) and [@&#8203;actions/tool-cache](https://github.com/actions/tool-cache) and Remove uuid by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2459](https://github.com/actions/checkout/pull/2459)
- upgrade module to esm and update dependencies by [@&#8203;aiqiaoy](https://github.com/aiqiaoy) in [#&#8203;2463](https://github.com/actions/checkout/pull/2463)
- Bump the minor-npm-dependencies group across 1 directory with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2462](https://github.com/actions/checkout/pull/2462)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjAuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: #144
Co-authored-by: Renovate Bot <renovate@unbound.se>
Co-committed-by: Renovate Bot <renovate@unbound.se>
2026-06-20 19:25:11 +00:00
renovate 2f872143b3 fix(deps): update aws-sdk-go-v2 monorepo (#142)
storage / test (push) Successful in 1m42s
storage / vulnerabilities (push) Successful in 1m46s
Release / release (push) Successful in 58s
pre-commit / pre-commit (push) Successful in 6m7s
2026-06-19 19:34:45 +00:00
renovate d1024ef0d4 fix(deps): update aws-sdk-go-v2 monorepo (#140)
Release / release (push) Successful in 1m0s
storage / test (push) Successful in 1m37s
storage / vulnerabilities (push) Successful in 1m36s
pre-commit / pre-commit (push) Successful in 6m12s
2026-06-13 19:27:43 +00:00
renovate f038c55ac6 fix(deps): update aws-sdk-go-v2 monorepo (#138)
Release / release (push) Successful in 58s
storage / test (push) Successful in 1m33s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 5m48s
2026-06-11 19:29:20 +00:00
releaser fde0fbb16f chore(release): prepare for v0.4.2 (#137)
Release / release (push) Successful in 1m9s
storage / test (push) Successful in 2m7s
pre-commit / pre-commit (push) Successful in 6m32s
storage / vulnerabilities (push) Failing after 16m28s
## [0.4.2] - 2026-06-08

### 🐛 Bug Fixes

- *(deps)* Update aws-sdk-go-v2 monorepo (#116)
- *(deps)* Update aws-sdk-go-v2 monorepo (#118)
- *(deps)* Update aws-sdk-go-v2 monorepo (#120)
- *(deps)* Update aws-sdk-go-v2 monorepo (#122)
- *(deps)* Update aws-sdk-go-v2 monorepo (#124)
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.2.3 (#126)
- *(deps)* Update aws-sdk-go-v2 monorepo (#128)
- *(deps)* Update aws-sdk-go-v2 monorepo (#130)
- *(deps)* Update aws-sdk-go-v2 monorepo (#132)
- *(deps)* Update aws-sdk-go-v2 monorepo to v0.2.7 (#134)
- *(deps)* Update aws-sdk-go-v2 monorepo to v0.2.8 (#136)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #137
Co-authored-by: Unbound Releaser <releaser@unbound.se>
Co-committed-by: Unbound Releaser <releaser@unbound.se>
2026-06-11 06:04:56 +00:00
renovate 6a28ebaafe fix(deps): update aws-sdk-go-v2 monorepo to v0.2.8 (#136)
Release / release (push) Successful in 1m4s
storage / test (push) Successful in 1m33s
storage / vulnerabilities (push) Successful in 1m37s
pre-commit / pre-commit (push) Successful in 6m45s
2026-06-08 21:33:08 +00:00
renovate 84011d41b6 fix(deps): update aws-sdk-go-v2 monorepo to v0.2.7 (#134)
Release / release (push) Successful in 58s
storage / test (push) Successful in 1m30s
storage / vulnerabilities (push) Successful in 1m43s
pre-commit / pre-commit (push) Successful in 6m9s
2026-06-08 19:32:41 +00:00
renovate 0847617837 fix(deps): update aws-sdk-go-v2 monorepo (#132)
Release / release (push) Successful in 58s
storage / test (push) Successful in 1m33s
storage / vulnerabilities (push) Successful in 1m36s
pre-commit / pre-commit (push) Successful in 5m28s
2026-06-07 20:24:11 +00:00
renovate ebee54114f fix(deps): update aws-sdk-go-v2 monorepo (#130)
Release / release (push) Successful in 1m8s
storage / test (push) Successful in 1m34s
storage / vulnerabilities (push) Successful in 1m34s
pre-commit / pre-commit (push) Successful in 5m37s
2026-06-06 07:28:08 +00:00
renovate 34390f572a fix(deps): update aws-sdk-go-v2 monorepo (#128)
Release / release (push) Successful in 55s
storage / test (push) Successful in 1m32s
storage / vulnerabilities (push) Successful in 1m38s
pre-commit / pre-commit (push) Successful in 5m36s
2026-06-05 19:37:17 +00:00
renovate 906a729ee8 fix(deps): update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.2.3 (#126)
storage / test (push) Successful in 1m36s
storage / vulnerabilities (push) Successful in 1m38s
Release / release (push) Successful in 57s
pre-commit / pre-commit (push) Successful in 6m2s
2026-06-04 19:28:19 +00:00
renovate df37079491 fix(deps): update aws-sdk-go-v2 monorepo (#124)
Release / release (push) Successful in 1m5s
storage / test (push) Successful in 1m33s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 5m41s
2026-06-01 19:30:21 +00:00
renovate 23f8e5e9eb fix(deps): update aws-sdk-go-v2 monorepo (#122)
Release / release (push) Successful in 1m1s
storage / test (push) Successful in 1m31s
storage / vulnerabilities (push) Successful in 1m41s
pre-commit / pre-commit (push) Successful in 5m40s
2026-05-31 19:30:17 +00:00
renovate 7761c0013b fix(deps): update aws-sdk-go-v2 monorepo (#120)
Release / release (push) Successful in 56s
storage / test (push) Successful in 1m32s
storage / vulnerabilities (push) Successful in 1m31s
pre-commit / pre-commit (push) Successful in 5m35s
2026-05-30 19:28:13 +00:00
renovate 8efeca8c41 fix(deps): update aws-sdk-go-v2 monorepo (#118)
Release / release (push) Successful in 1m8s
storage / test (push) Successful in 1m28s
storage / vulnerabilities (push) Successful in 1m41s
pre-commit / pre-commit (push) Successful in 5m30s
2026-05-25 19:00:36 +00:00
renovate 78ed511b18 fix(deps): update aws-sdk-go-v2 monorepo (#116)
storage / test (push) Successful in 1m38s
storage / vulnerabilities (push) Successful in 1m58s
pre-commit / pre-commit (push) Successful in 6m29s
Release / release (push) Successful in 58s
2026-05-09 19:28:36 +00:00
releaser ce2cdbe520 chore(release): prepare for v0.4.1 (#115)
Release / release (push) Successful in 47s
storage / test (push) Successful in 1m36s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 6m5s
## [0.4.1] - 2026-05-09

### 🐛 Bug Fixes

- *(deps)* Update aws-sdk-go-v2 monorepo (#102)
- *(deps)* Update aws-sdk-go-v2 monorepo (#103)
- *(deps)* Update aws-sdk-go-v2 monorepo (#104)
- *(deps)* Update aws-sdk-go-v2 monorepo (#105)
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.1.20 (#108)

### 🎨 Styling

- Apply gofumpt formatting to s3.go (#112)

### ⚙️ Miscellaneous Tasks

- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#106)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.0 (#110)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.1 (#111)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.2 (#114)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #115
Co-authored-by: Unbound Releaser <releaser@unbound.se>
Co-committed-by: Unbound Releaser <releaser@unbound.se>
2026-05-09 14:24:16 +00:00
renovate a7c6ed801a chore(deps): update pre-commit hook golangci/golangci-lint to v2.12.2 (#114)
storage / test (push) Successful in 1m40s
storage / vulnerabilities (push) Successful in 1m39s
Release / release (push) Successful in 52s
pre-commit / pre-commit (push) Successful in 6m20s
2026-05-09 12:44:19 +00:00
renovate 9e4fe1c49b chore(deps): update pre-commit hook golangci/golangci-lint to v2.12.1 (#111)
storage / test (push) Successful in 1m37s
storage / vulnerabilities (push) Successful in 1m40s
Release / release (push) Failing after 49s
pre-commit / pre-commit (push) Successful in 6m19s
2026-05-05 10:23:25 +00:00
argoyle 9805d2d213 style: apply gofumpt formatting to s3.go (#112)
Release / release (push) Successful in 1m0s
storage / test (push) Successful in 1m42s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 6m5s
2026-05-05 09:14:18 +00:00
renovate 88c37a2a77 chore(deps): update pre-commit hook golangci/golangci-lint to v2.12.0 (#110)
storage / vulnerabilities (push) Successful in 1m36s
Release / release (push) Failing after 47s
storage / test (push) Successful in 1m55s
pre-commit / pre-commit (push) Successful in 6m34s
2026-05-04 14:27:49 +00:00
renovate 397627b24b fix(deps): update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.1.20 (#108)
Release / release (push) Successful in 53s
storage / test (push) Successful in 1m34s
storage / vulnerabilities (push) Successful in 1m37s
pre-commit / pre-commit (push) Successful in 5m56s
2026-05-03 19:27:46 +00:00
renovate e93c8069eb chore(deps): update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#106)
storage / vulnerabilities (push) Successful in 1m35s
storage / test (push) Successful in 1m52s
Release / release (push) Successful in 1m2s
pre-commit / pre-commit (push) Successful in 6m1s
2026-05-03 16:52:18 +00:00
renovate 81e393de2a fix(deps): update aws-sdk-go-v2 monorepo (#105)
Release / release (push) Failing after 50s
storage / test (push) Successful in 1m41s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 6m16s
2026-05-03 06:56:31 +00:00
renovate fbbe21f911 fix(deps): update aws-sdk-go-v2 monorepo (#104)
Release / release (push) Failing after 46s
storage / test (push) Successful in 1m37s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 8m8s
2026-04-25 19:28:04 +00:00
renovate fbf1105c24 fix(deps): update aws-sdk-go-v2 monorepo (#103)
Release / release (push) Failing after 53s
storage / test (push) Successful in 1m40s
storage / vulnerabilities (push) Successful in 1m40s
pre-commit / pre-commit (push) Successful in 6m17s
2026-04-20 20:26:40 +00:00
renovate 46450f8f37 fix(deps): update aws-sdk-go-v2 monorepo (#102)
Release / release (push) Failing after 49s
storage / test (push) Successful in 1m35s
storage / vulnerabilities (push) Successful in 1m36s
pre-commit / pre-commit (push) Successful in 5m51s
2026-04-19 19:28:24 +00:00
releaser a4dedab2f5 chore(release): prepare for v0.4.0 (#100)
Release / release (push) Successful in 46s
storage / test (push) Successful in 1m40s
storage / vulnerabilities (push) Successful in 1m53s
pre-commit / pre-commit (push) Successful in 7m20s
## [0.4.0] - 2026-04-17

### 🚀 Features

- Auto-enable path-style addressing when a custom endpoint is set (#99)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #100
Co-authored-by: Unbound Releaser <releaser@unbound.se>
Co-committed-by: Unbound Releaser <releaser@unbound.se>
2026-04-17 17:31:17 +00:00
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
releaser 7539b5db24 chore(release): prepare for v0.3.0 (#98)
storage / test (push) Successful in 1m36s
Release / release (push) Successful in 1m56s
storage / vulnerabilities (push) Successful in 2m45s
pre-commit / pre-commit (push) Successful in 6m21s
## [0.3.0] - 2026-04-16

### 🚀 Features

- Add PresignInlineURL method for inline content display (#97)

<!-- generated by git-cliff -->

---

**Note:** Please use **Squash Merge** when merging this PR.

Reviewed-on: #98
Co-authored-by: Unbound Releaser <releaser@unbound.se>
Co-committed-by: Unbound Releaser <releaser@unbound.se>
2026-04-16 09:03:25 +00:00
argoyle 862ec3f7bc feat: add PresignInlineURL method for inline content display (#97)
storage / vulnerabilities (push) Successful in 1m43s
storage / test (push) Successful in 1m44s
Release / release (push) Successful in 58s
pre-commit / pre-commit (push) Successful in 6m14s
## Summary

- Add `PresignInlineURL(ctx, key, contentType)` method that generates presigned URLs with `Content-Disposition: inline` and optional `Content-Type` override
- Browsers will render content (e.g. PDFs) directly in iframes instead of triggering download dialogs
- Existing `PresignURL` remains unchanged

## Context

The document-service uses presigned S3 URLs to display PDFs in iframes. Without `Content-Disposition: inline`, the browser triggers a download dialog instead of rendering the PDF.

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

Reviewed-on: #97
2026-04-16 08:52:38 +00:00
9 changed files with 190 additions and 69 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: stable go-version: stable
@@ -20,7 +20,7 @@ jobs:
vulnerabilities: vulnerabilities:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: stable go-version: stable
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
env: env:
SKIP: no-commit-to-branch SKIP: no-commit-to-branch
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v7
- uses: actions/setup-go@v6 - uses: actions/setup-go@v6
with: with:
go-version: stable go-version: stable
+2 -2
View File
@@ -11,7 +11,7 @@ repos:
- --allow-multiple-documents - --allow-multiple-documents
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.24.0 rev: v9.25.0
hooks: hooks:
- id: commitlint - id: commitlint
stages: [ commit-msg ] stages: [ commit-msg ]
@@ -30,7 +30,7 @@ repos:
- 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.11.4 rev: v2.12.2
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
"version": "v0.2.0" "version": "v0.4.3"
} }
+61
View File
@@ -2,6 +2,67 @@
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.4.3] - 2026-06-20
### 🐛 Bug Fixes
- *(deps)* Update aws-sdk-go-v2 monorepo (#138)
- *(deps)* Update aws-sdk-go-v2 monorepo (#140)
- *(deps)* Update aws-sdk-go-v2 monorepo (#142)
### ⚙️ Miscellaneous Tasks
- *(deps)* Update actions/checkout action to v7 (#144)
## [0.4.2] - 2026-06-11
### 🐛 Bug Fixes
- *(deps)* Update aws-sdk-go-v2 monorepo (#116)
- *(deps)* Update aws-sdk-go-v2 monorepo (#118)
- *(deps)* Update aws-sdk-go-v2 monorepo (#120)
- *(deps)* Update aws-sdk-go-v2 monorepo (#122)
- *(deps)* Update aws-sdk-go-v2 monorepo (#124)
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.2.3 (#126)
- *(deps)* Update aws-sdk-go-v2 monorepo (#128)
- *(deps)* Update aws-sdk-go-v2 monorepo (#130)
- *(deps)* Update aws-sdk-go-v2 monorepo (#132)
- *(deps)* Update aws-sdk-go-v2 monorepo to v0.2.7 (#134)
- *(deps)* Update aws-sdk-go-v2 monorepo to v0.2.8 (#136)
## [0.4.1] - 2026-05-09
### 🐛 Bug Fixes
- *(deps)* Update aws-sdk-go-v2 monorepo (#102)
- *(deps)* Update aws-sdk-go-v2 monorepo (#103)
- *(deps)* Update aws-sdk-go-v2 monorepo (#104)
- *(deps)* Update aws-sdk-go-v2 monorepo (#105)
- *(deps)* Update module github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager to v0.1.20 (#108)
### 🎨 Styling
- Apply gofumpt formatting to s3.go (#112)
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook alessandrojcm/commitlint-pre-commit-hook to v9.25.0 (#106)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.0 (#110)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.1 (#111)
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.12.2 (#114)
## [0.4.0] - 2026-04-17
### 🚀 Features
- Auto-enable path-style addressing when a custom endpoint is set (#99)
## [0.3.0] - 2026-04-16
### 🚀 Features
- Add PresignInlineURL method for inline content display (#97)
## [0.2.0] - 2026-04-16 ## [0.2.0] - 2026-04-16
### 🚀 Features ### 🚀 Features
+19 -20
View File
@@ -3,27 +3,26 @@ module gitea.unbound.se/unboundsoftware/storage
go 1.24 go 1.24
require ( require (
github.com/aws/aws-sdk-go-v2 v1.41.5 github.com/aws/aws-sdk-go-v2 v1.42.0
github.com/aws/aws-sdk-go-v2/config v1.32.14 github.com/aws/aws-sdk-go-v2/config v1.32.25
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.15 github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.2.11
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0 github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0
) )
require ( require (
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.19.14 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.19.24 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 // indirect github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 // indirect
github.com/aws/aws-sdk-go-v2/service/signin v1.0.9 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.19 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.41.10 // indirect github.com/aws/smithy-go v1.27.1 // indirect
github.com/aws/smithy-go v1.24.2 // indirect
) )
+38 -40
View File
@@ -1,40 +1,38 @@
github.com/aws/aws-sdk-go-v2 v1.41.5 h1:dj5kopbwUsVUVFgO4Fi5BIT3t4WyqIDjGKCangnV/yY= github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA=
github.com/aws/aws-sdk-go-v2 v1.41.5/go.mod h1:mwsPRE8ceUUpiTgF7QmQIJ7lgsKUPQOUl3o72QBrE1o= github.com/aws/aws-sdk-go-v2 v1.42.0/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8 h1:eBMB84YGghSocM7PsjmmPffTa+1FBUeNvGvFou6V/4o= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.8/go.mod h1:lyw7GFp3qENLh7kwzf7iMzAxDn+NzjXEAGjKS2UOKqI= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls=
github.com/aws/aws-sdk-go-v2/config v1.32.14 h1:opVIRo/ZbbI8OIqSOKmpFaY7IwfFUOCCXBsUpJOwDdI= github.com/aws/aws-sdk-go-v2/config v1.32.25 h1:ACCejvStYoilgwrfegSt5ZntCbPrk52qfwyNcnl3omM=
github.com/aws/aws-sdk-go-v2/config v1.32.14/go.mod h1:U4/V0uKxh0Tl5sxmCBZ3AecYny4UNlVmObYjKuuaiOo= github.com/aws/aws-sdk-go-v2/config v1.32.25/go.mod h1:LJyU8sDRbXUxFn8xMJIGP+v9QYYwveNLI8a/giAOiAs=
github.com/aws/aws-sdk-go-v2/credentials v1.19.14 h1:n+UcGWAIZHkXzYt87uMFBv/l8THYELoX6gVcUvgl6fI= github.com/aws/aws-sdk-go-v2/credentials v1.19.24 h1:2hQqYCV9yqyePQ9o6dCrZc/zO8U3TwPr9mIKlZnPu/I=
github.com/aws/aws-sdk-go-v2/credentials v1.19.14/go.mod h1:cJKuyWB59Mqi0jM3nFYQRmnHVQIcgoxjEMAbLkpr62w= github.com/aws/aws-sdk-go-v2/credentials v1.19.24/go.mod h1:IDwpACtwqHLISdzfwUUNq4P9DsB/h5BLg4FwJPNfqFY=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21 h1:NUS3K4BTDArQqNu2ih7yeDLaS3bmHD0YndtA6UP884g= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 h1:r6qZHbT+wxgWO/e9vYNUEtg7lv5+UN3pRqKhLXvnArg=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.21/go.mod h1:YWNWJQNjKigKY1RHVJCuupeWDrrHjRqHm0N9rdrWzYI= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29/go.mod h1:QRnaRcTVGKPGRy8w78HMQtKUGRYcnMZAANATkeVA6Mo=
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.15 h1:92MfpwB6KjsPIEq9g3DniRPxOe92ew5hUz1h8W8cX7E= github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.2.11 h1:ORrr68X2RQ4OBNI4aYJapjcmbaG5mst0Z7/tjUboZEA=
github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.1.15/go.mod h1:7O129SmOn4acM++3oVfTLAeHmNOsj0y7AA7zmbgnGOk= github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.2.11/go.mod h1:W4kVdkT0M/UDMNncotFG2X/HGX69yMdNn7S9WGMhUjk=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21 h1:Rgg6wvjjtX8bNHcvi9OnXWwcE0a2vGpbwmtICOsvcf4= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 h1:f3vKqSo13fhTYb+JEcXwXefZQE26I1FB5eTSniU67ko=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.21/go.mod h1:A/kJFst/nm//cyqonihbdpQZwiUhhzpqTsdbhDdRF9c= github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29/go.mod h1:MzoLFUArKGpGD+ukmPiTPG1X5x4o6M2kq4v2dr1FiEc=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21 h1:PEgGVtPoB6NTpPrBgqSE5hE/o47Ij9qk/SEZFbUOe9A= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 h1:RdwIf/CuUsvJX3RgJagbOyotl/cxoLY4xviKuE7p2GY=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.21/go.mod h1:p+hz+PRAYlY3zcpJhPwXlLC4C+kqn70WIHwnzAfs6ps= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29/go.mod h1:71wt8W2EgswdZy9Mf9KNnzxZ3TiZlv4caKghPktDOkA=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 h1:qYQ4pzQ2Oz6WpQ8T3HvGHnZydA72MnLuFK9tJwmrbHw= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 h1:VTGy885W5DKBxWRUJbym9hytNaYzsyaPkCHGRRMAOhU=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6/go.mod h1:O3h0IK87yXci+kg6flUKzJnWeziQUKciKrLjcatSNcY= github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30/go.mod h1:AS0HycUvJRFvTt613AYDOgO2jzw+00cVSMny8XB3yMY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22 h1:rWyie/PxDRIdhNf4DzRk0lvjVOqFJuNnO8WwaIRVxzQ= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.22/go.mod h1:zd/JsJ4P7oGfUhXn1VyLqaRZwPmZwg44Jf2dS84Dm3Y= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7 h1:5EniKhLZe4xzL7a+fU3C2tfUN4nWIqlLesfrjkuPFTY= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 h1:V51LGlOq/1VsDsHUdoklAQi7rMmx4qQubvFYAlP2254=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.7/go.mod h1:x0nZssQ3qZSnIcePWLvcoFisRXJzcTVvYpAAdYX8+GI= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22/go.mod h1:4Pzhyz8hJOm2bepgl+NjvRx8vlUFAIIvJnZ/MkcNPpU=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13 h1:JRaIgADQS/U6uXDqlPiefP32yXTda7Kqfx+LgspooZM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 h1:DRebniUGZ2MqiiIVmQJ04vIXr918hubdHMnarSLEWyU=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.13/go.mod h1:CEuVn5WqOMilYl+tbccq8+N2ieCy0gVn3OtRb0vBNNM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29/go.mod h1:LfRkPCD8YHDM2E5eTkos2UpwYeZnBcVarTa8L59bJHA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21 h1:c31//R3xgIJMSC8S6hEVq+38DcvUlgFY0FM6mSI5oto= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 h1:hiME6pBzC7OTl9LMtlyTWBuEl1f4QBcUmFDKC7MLXtc=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.21/go.mod h1:r6+pf23ouCB718FUxaqzZdbpYFyDtehyZcmP5KL9FkA= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29/go.mod h1:G7RP+uhagpKtKhd1BM9N6JQqjCcGEU47K5lBVZQyRQw=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21 h1:ZlvrNcHSFFWURB8avufQq9gFsheUgjVD9536obIknfM= github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0 h1:ta8csKy5vN91F3i5gGR85lFV0srBqySEji7Jroes6rE=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.21/go.mod h1:cv3TNhVrssKR0O/xxLJVRfd2oazSnZnkUeTf6ctUwfQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.104.0/go.mod h1:77ZAgynvx1txMvDG8gGWoWkO1augYDxkp9JElWFgjQU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0 h1:hlSuz394kV0vhv9drL5lhuEFbEOEP1VyQpy15qWh1Pk= github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 h1:3nXpRcFwRCW8n7HgO2QGy0Dc20eQNfBuUemGQhpF8m8=
github.com/aws/aws-sdk-go-v2/service/s3 v1.99.0/go.mod h1:uoA43SdFwacedBfSgfFSjjCvYe8aYBS7EnU5GZ/YKMM= github.com/aws/aws-sdk-go-v2/service/signin v1.2.0/go.mod h1:LxYujSTLPRlp2vTtcUO/+1ilrew8ytt6SvQyOgejzFQ=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.9 h1:QKZH0S178gCmFEgst8hN0mCX1KxLgHBKKY/CLqwP8lg= github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 h1:ey1XLTYXb9PcLt4535632o5kCGXNXEhNb620Dqwuylo=
github.com/aws/aws-sdk-go-v2/service/signin v1.0.9/go.mod h1:7yuQJoT+OoH8aqIxw9vwF+8KpvLZ8AWmvmUWHsGQZvI= github.com/aws/aws-sdk-go-v2/service/sso v1.31.3/go.mod h1:Lk7PlmoTYryQmyBG0EXqj5BcUbj3whXdU2s3yGI3EAc=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.15 h1:lFd1+ZSEYJZYvv9d6kXzhkZu07si3f+GQ1AaYwa2LUM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 h1:yLr03zQE/5Eu5l3QU0Si+xMbLMbSDF2YXsigqXngs6g=
github.com/aws/aws-sdk-go-v2/service/sso v1.30.15/go.mod h1:WSvS1NLr7JaPunCXqpJnWk1Bjo7IxzZXrZi1QQCkuqM= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6/go.mod h1:Q5N6icH+KJZDLh+ESNwzdv6cZ6vLFF/egy3IOxWhmz4=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.19 h1:dzztQ1YmfPrxdrOiuZRMF6fuOwWlWpD2StNLTceKpys= github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 h1:VrIhKRCSK1umelSgB9RghvA9RTUYeQffyAS5ApXehNI=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.19/go.mod h1:YO8TrYtFdl5w/4vmjL8zaBSsiNp3w0L1FfKVKenZT7w= github.com/aws/aws-sdk-go-v2/service/sts v1.43.3/go.mod h1:r8wkDOuLaaMFqFiYAb8dGY2A3gJCOujMc6CFOVC4Zhc=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.10 h1:p8ogvvLugcR/zLBXTXrTkj0RYBUdErbMnAFFp12Lm/U= github.com/aws/smithy-go v1.27.1 h1:4T340VFndXtADGF52gYa1POyL7s9E4Z1OeZ1hCscIw8=
github.com/aws/aws-sdk-go-v2/service/sts v1.41.10/go.mod h1:60dv0eZJfeVXfbT1tFJinbHrDfSJ2GZl4Q//OSSNAVw= github.com/aws/smithy-go v1.27.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/smithy-go v1.24.2 h1:FzA3bu/nt/vDvmnkg+R8Xl46gmzEDam6mZ1hzmwXFng=
github.com/aws/smithy-go v1.24.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
+37 -3
View File
@@ -3,6 +3,7 @@ package storage
import ( import (
"context" "context"
"io" "io"
"os"
"time" "time"
"github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws"
@@ -12,6 +13,19 @@ import (
"github.com/aws/aws-sdk-go-v2/service/s3" "github.com/aws/aws-sdk-go-v2/service/s3"
) )
// s3ClientOptions returns the per-client overrides applied to every S3 client
// constructed by this package. When the AWS_ENDPOINT_URL_S3 (or
// AWS_ENDPOINT_URL) env var is set — typically because the runtime is
// pointing at a local MinIO/S3-compatible endpoint — path-style addressing
// is enabled so requests look like `http://host:9000/bucket/key` instead of
// `http://bucket.host:9000/key`. Production deployments leave those vars
// unset and continue talking to real S3 with virtual-hosted style.
func s3ClientOptions(o *s3.Options) {
if os.Getenv("AWS_ENDPOINT_URL_S3") != "" || os.Getenv("AWS_ENDPOINT_URL") != "" {
o.UsePathStyle = true
}
}
// Uploader is the interface for uploading objects to S3 using the transfer manager // Uploader is the interface for uploading objects to S3 using the transfer manager
type Uploader interface { type Uploader interface {
UploadObject(ctx context.Context, input *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.UploadObjectOutput, error) UploadObject(ctx context.Context, input *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.UploadObjectOutput, error)
@@ -53,7 +67,8 @@ func (s *S3) storeWithManager(path string, content io.Reader, contentType string
if err != nil { if err != nil {
return "", err return "", err
} }
presignedUrl, err := s.presigner.PresignGetObject(context.Background(), presignedUrl, err := s.presigner.PresignGetObject(
context.Background(),
&s3.GetObjectInput{ &s3.GetObjectInput{
Bucket: aws.String(s.bucket), Bucket: aws.String(s.bucket),
Key: aws.String(*out.Key), Key: aws.String(*out.Key),
@@ -105,6 +120,25 @@ func (s *S3) PresignURL(ctx context.Context, key string) (string, error) {
return req.URL, nil return req.URL, nil
} }
// PresignInlineURL generates a presigned URL that tells the browser to display
// the content inline rather than triggering a download. The URL is valid for
// 15 minutes.
func (s *S3) PresignInlineURL(ctx context.Context, key string, contentType string) (string, error) {
input := &s3.GetObjectInput{
Bucket: aws.String(s.bucket),
Key: aws.String(key),
ResponseContentDisposition: aws.String("inline"),
}
if contentType != "" {
input.ResponseContentType = aws.String(contentType)
}
req, err := s.presigner.PresignGetObject(ctx, input, s3.WithPresignExpires(15*time.Minute))
if err != nil {
return "", err
}
return req.URL, nil
}
// New creates a new S3 storage instance using the upload manager // New creates a new S3 storage instance using the upload manager
// This loads AWS config from the default locations and is suitable for most use cases // This loads AWS config from the default locations and is suitable for most use cases
func New(bucket string) (*S3, error) { func New(bucket string) (*S3, error) {
@@ -112,7 +146,7 @@ func New(bucket string) (*S3, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
client := s3.NewFromConfig(cfg) client := s3.NewFromConfig(cfg, s3ClientOptions)
uploader := transfermanager.New(client, func(o *transfermanager.Options) { uploader := transfermanager.New(client, func(o *transfermanager.Options) {
o.PartSizeBytes = 5 * 1024 * 1024 o.PartSizeBytes = 5 * 1024 * 1024
}) })
@@ -128,7 +162,7 @@ func New(bucket string) (*S3, error) {
// NewS3 creates a new S3 storage instance using direct PutObject // NewS3 creates a new S3 storage instance using direct PutObject
// This is useful when you want more control over the AWS configuration // This is useful when you want more control over the AWS configuration
func NewS3(cfg aws.Config, bucket string) *S3 { func NewS3(cfg aws.Config, bucket string) *S3 {
client := s3.NewFromConfig(cfg) client := s3.NewFromConfig(cfg, s3ClientOptions)
return &S3{ return &S3{
bucket: bucket, bucket: bucket,
directSvc: client, directSvc: client,
+29
View File
@@ -40,6 +40,35 @@ func (m *mockPresigner) PresignGetObject(ctx context.Context, params *s3.GetObje
return m.presignFunc(ctx, params, optFns...) return m.presignFunc(ctx, params, optFns...)
} }
// Test path-style toggle
func TestS3ClientOptions_PathStyleTogglesOnCustomEndpoint(t *testing.T) {
cases := []struct {
name string
envVar string
value string
expected bool
}{
{name: "no env var → virtual-hosted", envVar: "", expected: false},
{name: "AWS_ENDPOINT_URL_S3 set → path-style", envVar: "AWS_ENDPOINT_URL_S3", value: "http://minio:9000", expected: true},
{name: "AWS_ENDPOINT_URL set → path-style", envVar: "AWS_ENDPOINT_URL", value: "http://minio:9000", expected: true},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
t.Setenv("AWS_ENDPOINT_URL", "")
t.Setenv("AWS_ENDPOINT_URL_S3", "")
if tc.envVar != "" {
t.Setenv(tc.envVar, tc.value)
}
opts := s3.Options{}
s3ClientOptions(&opts)
if opts.UsePathStyle != tc.expected {
t.Fatalf("UsePathStyle = %v, want %v", opts.UsePathStyle, tc.expected)
}
})
}
}
// Test NewS3 constructor // Test NewS3 constructor
func TestNewS3(t *testing.T) { func TestNewS3(t *testing.T) {