Added AnonListObjectsV2 support to GCS (#4584)

This commit is contained in:
Nitish Tiwari
2017-06-23 17:35:45 -07:00
committed by Harshavardhana
parent 8b7df7da37
commit 15b65a8342
17 changed files with 246 additions and 254 deletions
+9 -3
View File
@@ -111,9 +111,15 @@ func (l *gcsGateway) AnonListObjects(bucket string, prefix string, marker string
return fromMinioClientListBucketResult(bucket, result), nil
}
// AnonListObjectsV2 - List objects anonymously v2
func (l *gcsGateway) AnonListObjectsV2(bucket, prefix, continuationToken string, fetchOwner bool, delimiter string, maxKeys int) (loi ListObjectsV2Info, e error) {
return loi, NotImplemented{}
// AnonListObjectsV2 - List objects in V2 mode, anonymously
func (l *gcsGateway) AnonListObjectsV2(bucket, prefix, continuationToken string, fetchOwner bool, delimiter string, maxKeys int) (ListObjectsV2Info, error) {
// Request V1 List Object to the backend
result, err := l.anonClient.ListObjects(bucket, prefix, continuationToken, delimiter, maxKeys)
if err != nil {
return ListObjectsV2Info{}, s3ToObjectError(traceError(err), bucket)
}
// translate V1 Result to V2Info
return fromMinioClientListBucketResultToV2Info(bucket, result), nil
}
// AnonGetBucketInfo - Get bucket metadata anonymously.