diff --git a/go.mod b/go.mod index 75ce97ec05761..b5ef12efd5e95 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/alicebob/miniredis/v2 v2.30.4 github.com/aliyun/aliyun-oss-go-sdk v2.2.10+incompatible github.com/aws/aws-sdk-go v1.54.19 - github.com/baidubce/bce-sdk-go v0.9.192 + github.com/baidubce/bce-sdk-go v0.9.196 github.com/bmatcuk/doublestar v1.3.4 github.com/c2h5oh/datasize v0.0.0-20231215233829-aa82cc1e6500 github.com/cespare/xxhash v1.1.0 diff --git a/go.sum b/go.sum index c47d356cc10d3..da25cc7daf4dc 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/aws/smithy-go v1.11.1 h1:IQ+lPZVkSM3FRtyaDox41R8YS6iwPMYIreejOgPW49g= github.com/aws/smithy-go v1.11.1/go.mod h1:3xHYmszWVx2c0kIwQeEVf9uSm4fYZt67FBJnwub1bgM= github.com/axiomhq/hyperloglog v0.0.0-20240507144631-af9851f82b27 h1:60m4tnanN1ctzIu4V3bfCNJ39BiOPSm1gHFlFjTkRE0= github.com/axiomhq/hyperloglog v0.0.0-20240507144631-af9851f82b27/go.mod h1:k08r+Yj1PRAmuayFiRK6MYuR5Ve4IuZtTfxErMIh0+c= -github.com/baidubce/bce-sdk-go v0.9.192 h1:cnSFxCiwAZ2ZMEpxeDi2DVvrzq65gRH4TakSoWQJeC4= -github.com/baidubce/bce-sdk-go v0.9.192/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= +github.com/baidubce/bce-sdk-go v0.9.196 h1:FywykM9euTmPNZknBn6WtNUEYTkccwQLCcqrxHvaFCQ= +github.com/baidubce/bce-sdk-go v0.9.196/go.mod h1:zbYJMQwE4IZuyrJiFO8tO8NbtYiKTFTbwh4eIsqjVdg= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo4tARvBm7l6KA9iVMnE3NWizDeWSrps= github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= diff --git a/vendor/github.com/baidubce/bce-sdk-go/bce/config.go b/vendor/github.com/baidubce/bce-sdk-go/bce/config.go index f4871a3c92b5f..2e2f0389b5068 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/bce/config.go +++ b/vendor/github.com/baidubce/bce-sdk-go/bce/config.go @@ -26,7 +26,7 @@ import ( // Constants and default values for the package bce const ( - SDK_VERSION = "0.9.192" + SDK_VERSION = "0.9.196" URI_PREFIX = "/" // now support uri without prefix "v1" so just set root path DEFAULT_DOMAIN = "baidubce.com" DEFAULT_PROTOCOL = "http" diff --git a/vendor/github.com/baidubce/bce-sdk-go/http/constants.go b/vendor/github.com/baidubce/bce-sdk-go/http/constants.go index fbbea847db9c4..4c6f6d1f39f54 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/http/constants.go +++ b/vendor/github.com/baidubce/bce-sdk-go/http/constants.go @@ -65,6 +65,7 @@ const ( // BOS HTTP Headers BCE_COPY_METADATA_DIRECTIVE = "x-bce-metadata-directive" + BCE_COPY_TAGGING_DIRECTIVE = "x-bce-tagging-directive" BCE_COPY_SOURCE = "x-bce-copy-source" BCE_COPY_SOURCE_IF_MATCH = "x-bce-copy-source-if-match" BCE_COPY_SOURCE_IF_MODIFIED_SINCE = "x-bce-copy-source-if-modified-since" diff --git a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/model.go b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/model.go index 8a529cbd8d65a..5712b567d75a4 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/model.go +++ b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/model.go @@ -280,10 +280,13 @@ type CopyObjectArgs struct { IfUnmodifiedSince string TrafficLimit int64 CannedAcl string + TaggingDirective string } type MultiCopyObjectArgs struct { StorageClass string + ObjectTagging string + TaggingDirective string } type CallbackResult struct { @@ -456,6 +459,8 @@ type InitiateMultipartUploadArgs struct { ContentDisposition string Expires string StorageClass string + ObjectTagging string + TaggingDirective string } // InitiateMultipartUploadResult defines the result structure to initiate a multipart upload. diff --git a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/multipart.go b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/multipart.go index 94294093c292f..5acfd76a7104f 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/multipart.go +++ b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/multipart.go @@ -66,6 +66,14 @@ func InitiateMultipartUpload(cli bce.Client, bucket, object, contentType string, args.StorageClass) } } + if len(args.ObjectTagging) != 0 { + if ok, encodeTagging := validObjectTagging(args.ObjectTagging); ok { + req.SetHeader(http.BCE_OBJECT_TAGGING, encodeTagging) + } + } + if validMetadataDirective(args.TaggingDirective) { + req.SetHeader(http.BCE_COPY_TAGGING_DIRECTIVE, args.TaggingDirective) + } } // Send request and get the result diff --git a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/object.go b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/object.go index 68b7ca1ec986b..3702b84277936 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/object.go +++ b/vendor/github.com/baidubce/bce-sdk-go/services/bos/api/object.go @@ -201,6 +201,9 @@ func CopyObject(cli bce.Client, bucket, object, source string, "invalid metadata directive value: " + args.MetadataDirective) } } + if validMetadataDirective(args.TaggingDirective) { + req.SetHeader(http.BCE_COPY_TAGGING_DIRECTIVE, args.TaggingDirective) + } if validStorageClass(args.StorageClass) { req.SetHeader(http.BCE_STORAGE_CLASS, args.StorageClass) } else { diff --git a/vendor/github.com/baidubce/bce-sdk-go/services/bos/client.go b/vendor/github.com/baidubce/bce-sdk-go/services/bos/client.go index 2c4f44c9bd656..a3bd985e7a1e1 100644 --- a/vendor/github.com/baidubce/bce-sdk-go/services/bos/client.go +++ b/vendor/github.com/baidubce/bce-sdk-go/services/bos/client.go @@ -2118,6 +2118,8 @@ func (c *Client) ParallelCopy(srcBucketName string, srcObjectName string, ContentDisposition: objectMeta.ContentDisposition, Expires: objectMeta.Expires, StorageClass: objectMeta.StorageClass, + ObjectTagging: args.ObjectTagging, + TaggingDirective: args.TaggingDirective, } if args != nil { if len(args.StorageClass) != 0 { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5c2359b42266b..ef0d573576d04 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -486,7 +486,7 @@ github.com/aws/smithy-go/transport/http/internal/io # github.com/axiomhq/hyperloglog v0.0.0-20240507144631-af9851f82b27 ## explicit; go 1.12 github.com/axiomhq/hyperloglog -# github.com/baidubce/bce-sdk-go v0.9.192 +# github.com/baidubce/bce-sdk-go v0.9.196 ## explicit; go 1.11 github.com/baidubce/bce-sdk-go/auth github.com/baidubce/bce-sdk-go/bce