summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api-compose-object.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-05 21:58:38 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:12:41 +0100
commitd0c551acb5ab79efafd325f5b19c76a3de835356 (patch)
treeba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/minio/minio-go/v7/api-compose-object.go
parent[performance] when transforming media, perform read operations of large files... (diff)
downloadgotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97 - github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0 - github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6 - codeberg.org/gruf/go-mmap: fixes build for BSD platforms Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api-compose-object.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-compose-object.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-compose-object.go b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
index 154af7121..232bd2c01 100644
--- a/vendor/github.com/minio/minio-go/v7/api-compose-object.go
+++ b/vendor/github.com/minio/minio-go/v7/api-compose-object.go
@@ -42,13 +42,15 @@ type CopyDestOptions struct {
// provided key. If it is nil, no encryption is performed.
Encryption encrypt.ServerSide
+ ChecksumType ChecksumType
+
// `userMeta` is the user-metadata key-value pairs to be set on the
// destination. The keys are automatically prefixed with `x-amz-meta-`
// if needed. If nil is passed, and if only a single source (of any
// size) is provided in the ComposeObject call, then metadata from the
// source is copied to the destination.
// if no user-metadata is provided, it is copied from source
- // (when there is only once source object in the compose
+ // (when there is only one source object in the compose
// request)
UserMetadata map[string]string
// UserMetadata is only set to destination if ReplaceMetadata is true
@@ -140,6 +142,9 @@ func (opts CopyDestOptions) Marshal(header http.Header) {
if !opts.Expires.IsZero() {
header.Set("Expires", opts.Expires.UTC().Format(http.TimeFormat))
}
+ if opts.ChecksumType.IsSet() {
+ header.Set(amzChecksumAlgo, opts.ChecksumType.String())
+ }
if opts.ReplaceMetadata {
header.Set("x-amz-metadata-directive", replaceDirective)
@@ -345,7 +350,7 @@ func (c *Client) copyObjectPartDo(ctx context.Context, srcBucket, srcObject, des
})
defer closeResponse(resp)
if err != nil {
- return
+ return p, err
}
// Check if we got an error response.
@@ -580,7 +585,7 @@ func partsRequired(size int64) int64 {
// it is not the last part.
func calculateEvenSplits(size int64, src CopySrcOptions) (startIndex, endIndex []int64) {
if size == 0 {
- return
+ return startIndex, endIndex
}
reqParts := partsRequired(size)
@@ -617,5 +622,5 @@ func calculateEvenSplits(size int64, src CopySrcOptions) (startIndex, endIndex [
startIndex[j], endIndex[j] = cStart, cEnd
}
- return
+ return startIndex, endIndex
}