Change GetOptions' fields to public (#3498)

This allows minio/console to take advantage of the current
S3Client Get function for downloading objects with version
This commit is contained in:
Cesar N
2020-11-19 13:43:35 -08:00
committed by GitHub
parent adafa0024f
commit d4f9ea859d
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -817,8 +817,8 @@ func (c *S3Client) Get(ctx context.Context, opts GetOptions) (io.ReadCloser, *pr
bucket, object := c.url2BucketAndObject()
reader, e := c.api.GetObject(ctx, bucket, object,
minio.GetObjectOptions{
ServerSideEncryption: opts.sse,
VersionID: opts.versionID,
ServerSideEncryption: opts.SSE,
VersionID: opts.VersionID,
})
if e != nil {
errResponse := minio.ToErrorResponse(e)
+2 -2
View File
@@ -46,8 +46,8 @@ const defaultMultipartThreadsNum = 4
// GetOptions holds options of the GET operation
type GetOptions struct {
sse encrypt.ServerSide
versionID string
SSE encrypt.ServerSide
VersionID string
}
// StatOptions holds options of the HEAD operation
+1 -1
View File
@@ -222,7 +222,7 @@ func getSourceStream(ctx context.Context, alias, urlStr, versionID string, fetch
if err != nil {
return nil, nil, err.Trace(alias, urlStr)
}
reader, err = sourceClnt.Get(ctx, GetOptions{sse: sse, versionID: versionID})
reader, err = sourceClnt.Get(ctx, GetOptions{SSE: sse, VersionID: versionID})
if err != nil {
return nil, nil, err.Trace(alias, urlStr)
}