diff options
author | Wim <wim@42.be> | 2022-06-11 23:07:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-11 23:07:42 +0200 |
commit | 8751fb4bb1eb7cd34ed63be9b3801b8aeac71a1d (patch) | |
tree | 601d2616b05b5b197bd2a3ae7cb245b1a0ea17e7 /vendor/github.com/minio/minio-go/v7/pkg | |
parent | 3819062574ac7e4af6a562bf40a425469a7752fb (diff) | |
download | matterbridge-msglm-8751fb4bb1eb7cd34ed63be9b3801b8aeac71a1d.tar.gz matterbridge-msglm-8751fb4bb1eb7cd34ed63be9b3801b8aeac71a1d.tar.bz2 matterbridge-msglm-8751fb4bb1eb7cd34ed63be9b3801b8aeac71a1d.zip |
Update dependencies (#1841)
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/pkg')
10 files changed, 21 insertions, 19 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go index ca6db005..dc3f3cc0 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/file_minio_client.go @@ -122,7 +122,7 @@ type config struct { // returned if it fails to read from the file. func loadAlias(filename, alias string) (hostConfig, error) { cfg := &config{} - var json = jsoniter.ConfigCompatibleWithStandardLibrary + json := jsoniter.ConfigCompatibleWithStandardLibrary configBytes, err := ioutil.ReadFile(filename) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go index 485a717e..f7a4af4a 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go @@ -19,6 +19,7 @@ package credentials import ( "bufio" + "context" "errors" "fmt" "io/ioutil" @@ -254,7 +255,10 @@ func getEcsTaskCredentials(client *http.Client, endpoint string, token string) ( } func fetchIMDSToken(client *http.Client, endpoint string) (string, error) { - req, err := http.NewRequest(http.MethodPut, endpoint+tokenPath, nil) + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + req, err := http.NewRequestWithContext(ctx, http.MethodPut, endpoint+tokenPath, nil) if err != nil { return "", err } diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_client_grants.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_client_grants.go index b6712b19..1f106ef7 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_client_grants.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_client_grants.go @@ -105,8 +105,8 @@ func NewSTSClientGrants(stsEndpoint string, getClientGrantsTokenExpiry func() (* } func getClientGrantsCredentials(clnt *http.Client, endpoint string, - getClientGrantsTokenExpiry func() (*ClientGrantsToken, error)) (AssumeRoleWithClientGrantsResponse, error) { - + getClientGrantsTokenExpiry func() (*ClientGrantsToken, error), +) (AssumeRoleWithClientGrantsResponse, error) { accessToken, err := getClientGrantsTokenExpiry() if err != nil { return AssumeRoleWithClientGrantsResponse{}, err @@ -138,7 +138,6 @@ func getClientGrantsCredentials(clnt *http.Client, endpoint string, buf, err := ioutil.ReadAll(resp.Body) if err != nil { return AssumeRoleWithClientGrantsResponse{}, err - } _, err = xmlDecodeAndBody(bytes.NewReader(buf), &errResp) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go index 39c7892b..586995e8 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_ldap_identity.go @@ -174,7 +174,6 @@ func (k *LDAPIdentity) Retrieve() (value Value, err error) { buf, err := ioutil.ReadAll(resp.Body) if err != nil { return value, err - } _, err = xmlDecodeAndBody(bytes.NewReader(buf), &errResp) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_tls_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_tls_identity.go index 7f485d63..c7ac4db3 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_tls_identity.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_tls_identity.go @@ -94,7 +94,7 @@ func NewSTSCertificateIdentity(endpoint string, certificate tls.Certificate, opt if _, err := url.Parse(endpoint); err != nil { return nil, err } - var identity = &STSCertificateIdentity{ + identity := &STSCertificateIdentity{ STSEndpoint: endpoint, Client: http.Client{ Transport: &http.Transport{ @@ -127,7 +127,7 @@ func (i *STSCertificateIdentity) Retrieve() (Value, error) { if err != nil { return Value{}, err } - var livetime = i.S3CredentialLivetime + livetime := i.S3CredentialLivetime if livetime == 0 { livetime = 1 * time.Hour } @@ -155,7 +155,6 @@ func (i *STSCertificateIdentity) Retrieve() (Value, error) { buf, err := ioutil.ReadAll(resp.Body) if err != nil { return Value{}, err - } _, err = xmlDecodeAndBody(bytes.NewReader(buf), &errResp) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go index 98f6ea65..19bc3ddf 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/sts_web_identity.go @@ -107,7 +107,8 @@ func NewSTSWebIdentity(stsEndpoint string, getWebIDTokenExpiry func() (*WebIdent } func getWebIdentityCredentials(clnt *http.Client, endpoint, roleARN, roleSessionName string, - getWebIDTokenExpiry func() (*WebIdentityToken, error)) (AssumeRoleWithWebIdentityResponse, error) { + getWebIDTokenExpiry func() (*WebIdentityToken, error), +) (AssumeRoleWithWebIdentityResponse, error) { idToken, err := getWebIDTokenExpiry() if err != nil { return AssumeRoleWithWebIdentityResponse{}, err @@ -156,7 +157,6 @@ func getWebIdentityCredentials(clnt *http.Client, endpoint, roleARN, roleSession buf, err := ioutil.ReadAll(resp.Body) if err != nil { return AssumeRoleWithWebIdentityResponse{}, err - } _, err = xmlDecodeAndBody(bytes.NewReader(buf), &errResp) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/encrypt/server-side.go b/vendor/github.com/minio/minio-go/v7/pkg/encrypt/server-side.go index ce7d2153..06e68e73 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/encrypt/server-side.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/encrypt/server-side.go @@ -101,7 +101,7 @@ func NewSSEKMS(keyID string, context interface{}) (ServerSide, error) { if context == nil { return kms{key: keyID, hasContext: false}, nil } - var json = jsoniter.ConfigCompatibleWithStandardLibrary + json := jsoniter.ConfigCompatibleWithStandardLibrary serializedContext, err := json.Marshal(context) if err != nil { return nil, err diff --git a/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go b/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go index b17e6c54..75a1f609 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/notification/notification.go @@ -78,11 +78,13 @@ type Arn struct { // NewArn creates new ARN based on the given partition, service, region, account id and resource func NewArn(partition, service, region, accountID, resource string) Arn { - return Arn{Partition: partition, + return Arn{ + Partition: partition, Service: service, Region: region, AccountID: accountID, - Resource: resource} + Resource: resource, + } } // String returns the string format of the ARN diff --git a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go index d0ffbd05..97abf8df 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go @@ -432,7 +432,6 @@ func (c *Config) RemoveRule(opts Options) error { } c.Rules = newRules return nil - } // Rule - a rule for replication configuration. diff --git a/vendor/github.com/minio/minio-go/v7/pkg/signer/request-signature-streaming.go b/vendor/github.com/minio/minio-go/v7/pkg/signer/request-signature-streaming.go index 7b2ca91d..b1296d2b 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/signer/request-signature-streaming.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/signer/request-signature-streaming.go @@ -114,8 +114,8 @@ func buildChunkHeader(chunkLen int64, signature string) []byte { // buildChunkSignature - returns chunk signature for a given chunk and previous signature. func buildChunkSignature(chunkData []byte, reqTime time.Time, region, - previousSignature, secretAccessKey string) string { - + previousSignature, secretAccessKey string, +) string { chunkStringToSign := buildChunkStringToSign(reqTime, region, previousSignature, chunkData) signingKey := getSigningKey(secretAccessKey, region, reqTime, ServiceTypeS3) @@ -200,8 +200,8 @@ func (s *StreamingReader) setStreamingAuthHeader(req *http.Request) { // StreamingSignV4 - provides chunked upload signatureV4 support by // implementing io.Reader. func StreamingSignV4(req *http.Request, accessKeyID, secretAccessKey, sessionToken, - region string, dataLen int64, reqTime time.Time) *http.Request { - + region string, dataLen int64, reqTime time.Time, +) *http.Request { // Set headers needed for streaming signature. prepareStreamingRequest(req, sessionToken, dataLen, reqTime) |