summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2025-02-03 10:39:40 +0000
committerLibravatar GitHub <noreply@github.com>2025-02-03 10:39:40 +0000
commitacd3e80ae153bbdfc11b196689d71e3ec1bb3eed (patch)
tree498713061d806a43cb4e2ccbf662873d3b415668 /vendor/github.com/minio/minio-go/v7/api.go
parent[feature] Implement Web Push notification policy (#3721) (diff)
downloadgotosocial-acd3e80ae153bbdfc11b196689d71e3ec1bb3eed.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.81 to 7.0.84 (#3728)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.81 to 7.0.84. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.81...v7.0.84) --- updated-dependencies: - dependency-name: github.com/minio/minio-go/v7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api.go22
1 files changed, 17 insertions, 5 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api.go b/vendor/github.com/minio/minio-go/v7/api.go
index 88e8d4347..cc0ded2c7 100644
--- a/vendor/github.com/minio/minio-go/v7/api.go
+++ b/vendor/github.com/minio/minio-go/v7/api.go
@@ -133,7 +133,7 @@ type Options struct {
// Global constants.
const (
libraryName = "minio-go"
- libraryVersion = "v7.0.81"
+ libraryVersion = "v7.0.84"
)
// User Agent should always following the below style.
@@ -600,9 +600,9 @@ func (c *Client) executeMethod(ctx context.Context, method string, metadata requ
return nil, errors.New(c.endpointURL.String() + " is offline.")
}
- var retryable bool // Indicates if request can be retried.
- var bodySeeker io.Seeker // Extracted seeker from io.Reader.
- var reqRetry = c.maxRetries // Indicates how many times we can retry the request
+ var retryable bool // Indicates if request can be retried.
+ var bodySeeker io.Seeker // Extracted seeker from io.Reader.
+ reqRetry := c.maxRetries // Indicates how many times we can retry the request
if metadata.contentBody != nil {
// Check if body is seekable then it is retryable.
@@ -808,7 +808,7 @@ func (c *Client) newRequest(ctx context.Context, method string, metadata request
}
// Get credentials from the configured credentials provider.
- value, err := c.credsProvider.Get()
+ value, err := c.credsProvider.GetWithContext(c.CredContext())
if err != nil {
return nil, err
}
@@ -1018,3 +1018,15 @@ func (c *Client) isVirtualHostStyleRequest(url url.URL, bucketName string) bool
// path style requests
return s3utils.IsVirtualHostSupported(url, bucketName)
}
+
+// CredContext returns the context for fetching credentials
+func (c *Client) CredContext() *credentials.CredContext {
+ httpClient := c.httpClient
+ if httpClient == nil {
+ httpClient = http.DefaultClient
+ }
+ return &credentials.CredContext{
+ Client: httpClient,
+ Endpoint: c.endpointURL.String(),
+ }
+}