Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: minio/minio-go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.1
Choose a base ref
...
head repository: minio/minio-go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 40,947 additions and 8,976 deletions.
  1. +48 −0 .github/workflows/go-windows.yml
  2. +51 −0 .github/workflows/go.yml
  3. +30 −0 .github/workflows/vulncheck.yml
  4. +5 −1 .gitignore
  5. +27 −0 .golangci.yml
  6. +0 −25 .travis.yml
  7. +1 −0 CNAME
  8. +0 −1 CONTRIBUTING.md
  9. +1,101 −0 CREDITS
  10. +22 −6 MAINTAINERS.md
  11. +42 −0 Makefile
  12. +9 −0 NOTICE
  13. +167 −105 README.md
  14. +136 −0 api-bucket-cors.go
  15. +134 −0 api-bucket-encryption.go
  16. +169 −0 api-bucket-lifecycle.go
  17. +260 −0 api-bucket-notification.go
  18. +147 −0 api-bucket-policy.go
  19. +355 −0 api-bucket-replication.go
  20. +134 −0 api-bucket-tagging.go
  21. +146 −0 api-bucket-versioning.go
  22. +359 −294 api-compose-object.go
  23. +120 −23 api-compose-object_test.go
  24. +76 −0 api-copy-object.go
  25. +181 −6 api-datatypes.go
  26. +95 −78 api-error-response.go
  27. +89 −83 api-error-response_test.go
  28. +152 −0 api-get-object-acl.go
  29. +201 −0 api-get-object-attributes.go
  30. +25 −11 api-get-object-file.go
  31. +245 −243 api-get-object.go
  32. +148 −0 api-get-object_test.go
  33. +203 −0 api-get-options.go
  34. +0 −107 api-get-policy.go
  35. +613 −228 api-list.go
  36. +0 −225 api-notification.go
  37. +176 −0 api-object-legal-hold.go
  38. +241 −0 api-object-lock.go
  39. +165 −0 api-object-retention.go
  40. +177 −0 api-object-tagging.go
  41. +74 −57 api-presigned.go
  42. +78 −0 api-prompt-object.go
  43. +84 −0 api-prompt-options.go
  44. +44 −175 api-put-bucket.go
  45. +75 −21 api-put-object-common.go
  46. +0 −46 api-put-object-encrypted.go
  47. +167 −0 api-put-object-fan-out.go
  48. +15 −17 api-put-object-file.go → api-put-object-file-context.go
  49. +208 −127 api-put-object-multipart.go
  50. +538 −164 api-put-object-streaming.go
  51. +366 −179 api-put-object.go
  52. +168 −0 api-put-object_test.go
  53. +246 −0 api-putobject-snowball.go
  54. +358 −90 api-remove.go
  55. +182 −0 api-restore.go
  56. +216 −8 api-s3-datatypes.go
  57. +757 −0 api-select.go
  58. +60 −118 api-stat.go
  59. +504 −240 api.go
  60. +68 −175 api_unit_test.go
  61. +0 −39 appveyor.yml
  62. +58 −38 bucket-cache.go
  63. +35 −29 bucket-cache_test.go
  64. +0 −231 bucket-notification.go
  65. +420 −0 checksum.go
  66. +80 −0 code_of_conduct.md
  67. +77 −13 constants.go
  68. +72 −42 core.go
  69. +526 −141 core_test.go
  70. +1,367 −627 docs/API.md
  71. +54 −0 examples/minio/checkbucketreplication.go
  72. +58 −0 examples/minio/getbucketreplicationmetrics.go
  73. +28 −0 examples/minio/go.mod
  74. +55 −0 examples/minio/go.sum
  75. +63 −0 examples/minio/listen-notification.go
  76. +13 −12 examples/minio/listenbucketnotification.go
  77. +64 −0 examples/minio/listobjectsV2WithMetadata.go
  78. +99 −0 examples/minio/put-object-fan-out.go
  79. +118 −0 examples/minio/putobjectsnowball.go
  80. +12 −5 examples/s3/bucketexists.go
  81. +39 −18 examples/s3/composeobject.go
  82. +79 −0 examples/s3/copyobject-with-new-tags.go
  83. +30 −24 examples/s3/copyobject.go
  84. +53 −0 examples/s3/enableversioning.go
  85. +12 −5 examples/s3/fgetobject.go
  86. +64 −0 examples/s3/fputencrypted-object.go
  87. +14 −5 examples/s3/fputobject.go
  88. +19 −32 examples/s3/get-encrypted-object.go
  89. +58 −0 examples/s3/getbucketencryption.go
  90. +70 −0 examples/s3/getbucketlifecycle.go
  91. +12 −5 examples/s3/getbucketnotification.go
  92. +27 −12 examples/s3/getbucketpolicy.go
  93. +67 −0 examples/s3/getbucketreplication.go
  94. +54 −0 examples/s3/getbuckettagging.go
  95. +58 −0 examples/s3/getbucketversioning.go
  96. +72 −0 examples/s3/getobject-client-encryption.go
  97. +81 −0 examples/s3/getobject-override-respheaders.go
  98. +12 −5 examples/s3/getobject.go
  99. +72 −0 examples/s3/getobjectacl.go
  100. +55 −0 examples/s3/getobjectlegalhold.go
  101. +63 −0 examples/s3/getobjectlockconfig.go
  102. +52 −0 examples/s3/getobjectretention.go
  103. +55 −0 examples/s3/getobjecttagging.go
  104. +35 −0 examples/s3/go.mod
  105. +80 −0 examples/s3/go.sum
  106. +58 −0 examples/s3/healthcheck.go
  107. +12 −5 examples/s3/listbuckets.go
  108. +12 −11 examples/s3/listincompleteuploads.go
  109. +21 −14 examples/s3/listobjects-N.go
  110. +17 −10 examples/s3/listobjects.go
  111. +16 −10 examples/s3/listobjectsV2.go
  112. +64 −0 examples/s3/listobjectversions.go
  113. +16 −5 examples/s3/makebucket.go
  114. +12 −5 examples/s3/presignedgetobject.go
  115. +60 −0 examples/s3/presignedheadobject.go
  116. +12 −5 examples/s3/presignedpostpolicy.go
  117. +12 −5 examples/s3/presignedputobject.go
  118. +25 −30 examples/s3/put-encrypted-object.go
  119. +76 −0 examples/s3/putbucketcors.go
  120. +82 −0 examples/s3/putobject-checksum.go
  121. +81 −0 examples/s3/putobject-client-encryption.go
  122. +24 −38 examples/s3/putobject-getobject-sse.go
  123. +13 −9 examples/s3/putobject-progress.go
  124. +17 −5 examples/s3/putobject-s3-accelerate.go
  125. +12 −5 examples/s3/putobject-streaming.go
  126. +67 −0 examples/s3/putobject-with-tags.go
  127. +17 −6 examples/s3/putobject.go
  128. +56 −0 examples/s3/putobjectlegalhold.go
  129. +60 −0 examples/s3/putobjectretention.go
  130. +60 −0 examples/s3/putobjecttagging.go
  131. +12 −5 examples/s3/removeallbucketnotification.go
  132. +12 −6 examples/s3/removebucket.go
  133. +55 −0 examples/s3/removebucketencryption.go
  134. +14 −14 examples/s3/{listbucketpolicies.go → removebucketreplication.go}
  135. +51 −0 examples/s3/removebuckettagging.go
  136. +12 −5 examples/s3/removeincompleteupload.go
  137. +18 −5 examples/s3/removeobject.go
  138. +20 −9 examples/s3/removeobjects.go
  139. +51 −0 examples/s3/removeobjecttagging.go
  140. +77 −0 examples/s3/restoreobject-select.go
  141. +59 −0 examples/s3/restoreobject.go
  142. +78 −0 examples/s3/selectobject.go
  143. +56 −0 examples/s3/setbucketencryption.go
  144. +66 −0 examples/s3/setbucketlifecycle.go
  145. +26 −18 examples/s3/setbucketnotification.go
  146. +15 −12 examples/s3/setbucketpolicy.go
  147. +66 −0 examples/s3/setbucketreplication.go
  148. +61 −0 examples/s3/setbuckettagging.go
  149. +60 −0 examples/s3/setobjectlockconfig.go
  150. +12 −5 examples/s3/statobject.go
  151. +53 −0 examples/s3/suspendversioning.go
  152. +12,566 −2,775 functional_tests.go
  153. +101 −0 get-options_test.go
  154. +23 −0 go.mod
  155. +37 −0 go.sum
  156. +69 −0 healthcheck_test.go
  157. +44 −13 hook-reader.go
  158. +91 −0 pkg/cors/cors.go
  159. +43 −0 pkg/cors/cors_test.go
  160. +2 −0 pkg/cors/testdata/example.xml
  161. +264 −0 pkg/credentials/assume_role.go
  162. +46 −29 pkg/credentials/chain.go
  163. +20 −7 pkg/credentials/chain_test.go
  164. +1 −1 pkg/credentials/config.json.sample
  165. +81 −14 pkg/credentials/credentials.go
  166. +7 −0 pkg/credentials/credentials.json
  167. +3 −0 pkg/credentials/credentials.sample
  168. +10 −4 pkg/credentials/credentials_test.go
  169. +33 −18 pkg/credentials/doc.go
  170. +13 −4 pkg/credentials/env_aws.go
  171. +23 −8 pkg/credentials/env_minio.go
  172. +5 −6 pkg/credentials/env_test.go
  173. +95 −0 pkg/credentials/error_response.go
  174. +71 −24 pkg/credentials/file_aws_credentials.go
  175. +46 −29 pkg/credentials/file_minio_client.go
  176. +37 −12 pkg/credentials/file_test.go
  177. +289 −44 pkg/credentials/iam_aws.go
  178. +264 −23 pkg/credentials/iam_aws_test.go
  179. +2 −1 pkg/credentials/{signature-type.go → signature_type.go}
  180. +7 −2 pkg/credentials/static.go
  181. +4 −4 pkg/credentials/static_test.go
  182. +203 −0 pkg/credentials/sts_client_grants.go
  183. +173 −0 pkg/credentials/sts_custom_identity.go
  184. +216 −0 pkg/credentials/sts_ldap_identity.go
  185. +226 −0 pkg/credentials/sts_tls_identity.go
  186. +265 −0 pkg/credentials/sts_web_identity.go
  187. +0 −293 pkg/encrypt/cbc.go
  188. +8 −6 api-put-object-copy.go → pkg/encrypt/fips_disabled.go
  189. +24 −0 pkg/encrypt/fips_enabled.go
  190. +0 −53 pkg/encrypt/interface.go
  191. +0 −165 pkg/encrypt/keys.go
  192. +197 −0 pkg/encrypt/server-side.go
  193. +542 −0 pkg/lifecycle/lifecycle.go
  194. +507 −0 pkg/lifecycle/lifecycle_test.go
  195. +78 −0 pkg/notification/info.go
  196. +441 −0 pkg/notification/notification.go
  197. +1,435 −0 pkg/notification/notification_test.go
  198. +7 −10 pkg/policy/bucket-policy-condition.go
  199. +3 −2 pkg/policy/bucket-policy-condition_test.go
  200. +60 −26 pkg/policy/bucket-policy.go
  201. +263 −8 pkg/policy/bucket-policy_test.go
  202. +1,008 −0 pkg/replication/replication.go
  203. +350 −0 pkg/replication/replication_test.go
  204. +0 −106 pkg/s3signer/request-signature-streaming_test.go
  205. +0 −70 pkg/s3signer/request-signature_test.go
  206. +0 −73 pkg/s3signer/utils_test.go
  207. +133 −33 pkg/s3utils/utils.go
  208. +129 −43 pkg/s3utils/utils_test.go
  209. +8 −9 pkg/set/stringset.go
  210. +110 −4 pkg/set/stringset_test.go
  211. +224 −0 pkg/signer/request-signature-streaming-unsigned-trailer.go
  212. +133 −37 pkg/{s3signer → signer}/request-signature-streaming.go
  213. +180 −0 pkg/signer/request-signature-streaming_test.go
  214. +64 −67 pkg/{s3signer → signer}/request-signature-v2.go
  215. +3 −2 pkg/{s3signer → signer}/request-signature-v2_test.go
  216. +114 −77 pkg/{s3signer → signer}/request-signature-v4.go
  217. +52 −0 pkg/signer/request-signature-v4_test.go
  218. +88 −0 pkg/signer/request-signature_test.go
  219. +6 −6 pkg/{s3signer → signer}/test-utils_test.go
  220. +26 −3 pkg/{s3signer → signer}/utils.go
  221. +114 −0 pkg/signer/utils_test.go
  222. +66 −0 pkg/sse/sse.go
  223. +413 −0 pkg/tags/tags.go
  224. +117 −0 pkg/tags/tags_test.go
  225. +269 −35 post-policy.go
  226. +459 −0 post-policy_test.go
  227. +0 −111 request-headers.go
  228. +0 −56 request-headers_test.go
  229. +22 −5 retry-continous.go
  230. +48 −49 retry.go
  231. +162 −23 s3-endpoints.go
  232. +4 −2 s3-error.go
  233. +5 −4 test-utils_test.go
  234. +28 −0 testcerts/private.key
  235. +25 −0 testcerts/public.crt
  236. +57 −22 transport.go
  237. +0 −39 transport_1_5.go
  238. +0 −40 transport_1_6.go
  239. +699 −62 utils.go
  240. +220 −39 utils_test.go
48 changes: 48 additions & 0 deletions .github/workflows/go-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build (Windows)

on:
pull_request:
branches:
- master

# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
os: [windows-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Build on ${{ matrix.os }}
env:
MINT_MODE: core
SERVER_ENDPOINT: localhost:9000
ACCESS_KEY: minioadmin
SECRET_KEY: minioadmin
ENABLE_HTTPS: 1
MINIO_KMS_MASTER_KEY: my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574
MINIO_CI_CD: true
MINT_NO_FULL_OBJECT: true
run: |
New-Item -ItemType Directory -Path "$env:temp/certs-dir"
Copy-Item -Path testcerts\* -Destination "$env:temp/certs-dir"
Invoke-WebRequest -Uri https://dl.minio.io/server/minio/release/windows-amd64/minio.exe -OutFile $HOME/minio.exe
Start-Process -NoNewWindow -FilePath "$HOME/minio.exe" -ArgumentList "-S", "$env:temp/certs-dir", "server", "$env:temp/fs{1...4}"
$env:SSL_CERT_FILE = "$env:temp/certs-dir/public.crt"
go run functional_tests.go
51 changes: 51 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build (Linux)

on:
pull_request:
branches:
- master

# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
name: Test on Go ${{ matrix.go-version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
os: [ubuntu-latest]
steps:
- name: Set up Go ${{ matrix.go-version }} on ${{ matrix.os }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Build on ${{ matrix.os }}
env:
MINT_MODE: full
SERVER_ENDPOINT: localhost:9000
ACCESS_KEY: minioadmin
SECRET_KEY: minioadmin
ENABLE_HTTPS: 1
MINIO_KMS_MASTER_KEY: my-minio-key:6368616e676520746869732070617373776f726420746f206120736563726574
SSL_CERT_FILE: /tmp/certs-dir/public.crt
MINIO_CI_CD: true
MINT_NO_FULL_OBJECT: true
run: |
sudo apt update -y
sudo apt install devscripts -y
wget -O /tmp/minio https://dl.minio.io/server/minio/release/linux-amd64/minio
chmod +x /tmp/minio
mkdir -p /tmp/certs-dir
cp testcerts/* /tmp/certs-dir
/tmp/minio server --quiet -S /tmp/certs-dir /tmp/fs{1...4} &
make
30 changes: 30 additions & 0 deletions .github/workflows/vulncheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: VulnCheck
on:
pull_request:
branches:
- master
- main
push:
branches:
- master
- main
jobs:
vulncheck:
name: Analysis
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ 1.23.x ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Get govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
shell: bash
- name: Run govulncheck
run: govulncheck ./...
shell: bash
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*~
*.test
*.test
validator
golangci-lint
functional_tests
.idea
27 changes: 27 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
linters-settings:
misspell:
locale: US

linters:
disable-all: true
enable:
- typecheck
- goimports
- misspell
- revive
- govet
- ineffassign
- gosimple
- unused
- gocritic

issues:
exclude-use-default: false
exclude:
# todo fix these when we get enough time.
- "singleCaseSwitch: should rewrite switch statement to if statement"
- "unlambda: replace"
- "captLocal:"
- "ifElseChain:"
- "elseif:"
- "should have a package comment"
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
minio-go.min.io
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

### Developer Guidelines

``minio-go`` welcomes your contribution. To make the process as seamless as possible, we ask for the following:
Loading