fix: Add support for preserving mtime for replication (#9995)

This PR is needed for bucket replication support
This commit is contained in:
Harshavardhana
2020-07-08 17:36:56 -07:00
committed by GitHub
parent 6136a963c8
commit 2743d4ca87
14 changed files with 358 additions and 266 deletions

View File

@@ -20,6 +20,7 @@ import (
"context"
"io"
"net/http"
"time"
"github.com/minio/minio-go/v6/pkg/encrypt"
"github.com/minio/minio-go/v6/pkg/tags"
@@ -36,11 +37,12 @@ type GetObjectInfoFn func(ctx context.Context, bucket, object string, opts Objec
// ObjectOptions represents object options for ObjectLayer object operations
type ObjectOptions struct {
ServerSideEncryption encrypt.ServerSide
Versioned bool
VersionID string
UserDefined map[string]string
PartNumber int
CheckCopyPrecondFn CheckCopyPreconditionFn
Versioned bool // indicates if the bucket is versioned
VersionID string // Specifies the versionID which needs to be overwritten or read
MTime time.Time // Is only set in POST/PUT operations
UserDefined map[string]string // only set in case of POST/PUT operations
PartNumber int // only useful in case of GetObject/HeadObject
CheckCopyPrecondFn CheckCopyPreconditionFn // only set during CopyObject preconditional valuation
}
// BucketOptions represents bucket options for ObjectLayer bucket operations