Add extended checksum support (#15433)

This commit is contained in:
Klaus Post
2022-08-30 01:57:16 +02:00
committed by GitHub
parent 929b9e164e
commit a9f1ad7924
44 changed files with 1560 additions and 554 deletions
+25 -1
View File
@@ -23,7 +23,7 @@ import (
"math"
"time"
humanize "github.com/dustin/go-humanize"
"github.com/dustin/go-humanize"
"github.com/minio/madmin-go"
"github.com/minio/minio/internal/bucket/replication"
"github.com/minio/minio/internal/hash"
@@ -178,6 +178,9 @@ type ObjectInfo struct {
NumVersions int
// The modtime of the successor object version if any
SuccessorModTime time.Time
// User-Defined object tags
Checksum map[string]string
}
// ArchiveInfo returns any saved zip archive meta information
@@ -329,6 +332,9 @@ type ListPartsInfo struct {
// Any metadata set during InitMultipartUpload, including encryption headers.
UserDefined map[string]string
// ChecksumAlgorithm if set
ChecksumAlgorithm string
}
// Lookup - returns if uploadID is valid
@@ -505,6 +511,12 @@ type PartInfo struct {
// Decompressed Size.
ActualSize int64
// Checksum values
ChecksumCRC32 string
ChecksumCRC32C string
ChecksumSHA1 string
ChecksumSHA256 string
}
// CompletePart - represents the part that was completed, this is sent by the client
@@ -516,6 +528,12 @@ type CompletePart struct {
// Entity tag returned when the part was uploaded.
ETag string
// Checksum values. Optional.
ChecksumCRC32 string
ChecksumCRC32C string
ChecksumSHA1 string
ChecksumSHA256 string
}
// CompletedParts - is a collection satisfying sort.Interface.
@@ -530,3 +548,9 @@ func (a CompletedParts) Less(i, j int) bool { return a[i].PartNumber < a[j].Part
type CompleteMultipartUpload struct {
Parts []CompletePart `xml:"Part"`
}
// NewMultipartUploadResult contains information about a newly created multipart upload.
type NewMultipartUploadResult struct {
UploadID string
ChecksumAlgo string
}