add gateway object tagging support (#9124)

This commit is contained in:
P R
2020-05-23 11:09:35 -07:00
committed by GitHub
parent c138272d63
commit 3f6d624c7b
15 changed files with 193 additions and 55 deletions
+7 -7
View File
@@ -1009,8 +1009,8 @@ func (xl xlObjects) addPartialUpload(bucket, key string) {
}
}
// PutObjectTag - replace or add tags to an existing object
func (xl xlObjects) PutObjectTag(ctx context.Context, bucket, object string, tags string) error {
// PutObjectTags - replace or add tags to an existing object
func (xl xlObjects) PutObjectTags(ctx context.Context, bucket, object string, tags string) error {
disks := xl.getDisks()
// Read metadata associated with the object from all disks.
@@ -1046,13 +1046,13 @@ func (xl xlObjects) PutObjectTag(ctx context.Context, bucket, object string, tag
return nil
}
// DeleteObjectTag - delete object tags from an existing object
func (xl xlObjects) DeleteObjectTag(ctx context.Context, bucket, object string) error {
return xl.PutObjectTag(ctx, bucket, object, "")
// DeleteObjectTags - delete object tags from an existing object
func (xl xlObjects) DeleteObjectTags(ctx context.Context, bucket, object string) error {
return xl.PutObjectTags(ctx, bucket, object, "")
}
// GetObjectTag - get object tags from an existing object
func (xl xlObjects) GetObjectTag(ctx context.Context, bucket, object string) (*tags.Tags, error) {
// GetObjectTags - get object tags from an existing object
func (xl xlObjects) GetObjectTags(ctx context.Context, bucket, object string) (*tags.Tags, error) {
// GetObjectInfo will return tag value as well
oi, err := xl.GetObjectInfo(ctx, bucket, object, ObjectOptions{})
if err != nil {