mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
add gateway object tagging support (#9124)
This commit is contained in:
+16
-12
@@ -1223,6 +1223,10 @@ func (z *xlZones) IsCompressionSupported() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (z *xlZones) IsTaggingSupported() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// DeleteBucket - deletes a bucket on all zones simultaneously,
|
||||
// even if one of the zones fail to delete buckets, we proceed to
|
||||
// undo a successful operation.
|
||||
@@ -1538,13 +1542,13 @@ func (z *xlZones) IsReady(ctx context.Context) bool {
|
||||
return z.zones[0].IsReady(ctx)
|
||||
}
|
||||
|
||||
// PutObjectTag - replace or add tags to an existing object
|
||||
func (z *xlZones) PutObjectTag(ctx context.Context, bucket, object string, tags string) error {
|
||||
// PutObjectTags - replace or add tags to an existing object
|
||||
func (z *xlZones) PutObjectTags(ctx context.Context, bucket, object string, tags string) error {
|
||||
if z.SingleZone() {
|
||||
return z.zones[0].PutObjectTag(ctx, bucket, object, tags)
|
||||
return z.zones[0].PutObjectTags(ctx, bucket, object, tags)
|
||||
}
|
||||
for _, zone := range z.zones {
|
||||
err := zone.PutObjectTag(ctx, bucket, object, tags)
|
||||
err := zone.PutObjectTags(ctx, bucket, object, tags)
|
||||
if err != nil {
|
||||
if isErrBucketNotFound(err) {
|
||||
continue
|
||||
@@ -1558,13 +1562,13 @@ func (z *xlZones) PutObjectTag(ctx context.Context, bucket, object string, tags
|
||||
}
|
||||
}
|
||||
|
||||
// DeleteObjectTag - delete object tags from an existing object
|
||||
func (z *xlZones) DeleteObjectTag(ctx context.Context, bucket, object string) error {
|
||||
// DeleteObjectTags - delete object tags from an existing object
|
||||
func (z *xlZones) DeleteObjectTags(ctx context.Context, bucket, object string) error {
|
||||
if z.SingleZone() {
|
||||
return z.zones[0].DeleteObjectTag(ctx, bucket, object)
|
||||
return z.zones[0].DeleteObjectTags(ctx, bucket, object)
|
||||
}
|
||||
for _, zone := range z.zones {
|
||||
err := zone.DeleteObjectTag(ctx, bucket, object)
|
||||
err := zone.DeleteObjectTags(ctx, bucket, object)
|
||||
if err != nil {
|
||||
if isErrBucketNotFound(err) {
|
||||
continue
|
||||
@@ -1578,13 +1582,13 @@ func (z *xlZones) DeleteObjectTag(ctx context.Context, bucket, object string) er
|
||||
}
|
||||
}
|
||||
|
||||
// GetObjectTag - get object tags from an existing object
|
||||
func (z *xlZones) GetObjectTag(ctx context.Context, bucket, object string) (*tags.Tags, error) {
|
||||
// GetObjectTags - get object tags from an existing object
|
||||
func (z *xlZones) GetObjectTags(ctx context.Context, bucket, object string) (*tags.Tags, error) {
|
||||
if z.SingleZone() {
|
||||
return z.zones[0].GetObjectTag(ctx, bucket, object)
|
||||
return z.zones[0].GetObjectTags(ctx, bucket, object)
|
||||
}
|
||||
for _, zone := range z.zones {
|
||||
tags, err := zone.GetObjectTag(ctx, bucket, object)
|
||||
tags, err := zone.GetObjectTags(ctx, bucket, object)
|
||||
if err != nil {
|
||||
if isErrBucketNotFound(err) {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user