summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-12-05 11:46:40 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-05 11:46:40 +0100
commitbdc43a98da7cde6a297c1e480ff6c2961c8da3e1 (patch)
tree5e83ec5554c92a3f3c2fb74e006fd9ec19fae13b /vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go
parent[chore]: Bump golang.org/x/crypto from 0.15.0 to 0.16.0 (#2413) (diff)
downloadgotosocial-bdc43a98da7cde6a297c1e480ff6c2961c8da3e1.tar.xz
[chore]: Bump github.com/minio/minio-go/v7 from 7.0.63 to 7.0.65 (#2415)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.63 to 7.0.65. - [Release notes](https://github.com/minio/minio-go/releases) - [Commits](https://github.com/minio/minio-go/compare/v7.0.63...v7.0.65) --- 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-putobject-snowball.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go b/vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go
index 983ed6744..eb4da4147 100644
--- a/vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go
+++ b/vendor/github.com/minio/minio-go/v7/api-putobject-snowball.go
@@ -24,6 +24,7 @@ import (
"context"
"fmt"
"io"
+ "net/http"
"os"
"strings"
"sync"
@@ -70,6 +71,14 @@ type SnowballObject struct {
// Exactly 'Size' number of bytes must be provided.
Content io.Reader
+ // VersionID of the object; if empty, a new versionID will be generated
+ VersionID string
+
+ // Headers contains more options for this object upload, the same as you
+ // would include in a regular PutObject operation, such as user metadata
+ // and content-disposition, expires, ..
+ Headers http.Header
+
// Close will be called when an object has finished processing.
// Note that if PutObjectsSnowball returns because of an error,
// objects not consumed from the input will NOT have been closed.
@@ -181,6 +190,14 @@ objectLoop:
header.ModTime = time.Now().UTC()
}
+ header.PAXRecords = make(map[string]string)
+ if obj.VersionID != "" {
+ header.PAXRecords["minio.versionId"] = obj.VersionID
+ }
+ for k, vals := range obj.Headers {
+ header.PAXRecords["minio.metadata."+k] = strings.Join(vals, ",")
+ }
+
if err := t.WriteHeader(&header); err != nil {
closeObj()
return err