@@ -38,6 +38,7 @@ import (
38
38
"github.com/minio/minio-go/v7"
39
39
"github.com/minio/minio-go/v7/pkg/credentials"
40
40
"github.com/minio/minio-go/v7/pkg/notification"
41
+ "github.com/minio/minio-go/v7/pkg/tags"
41
42
)
42
43
43
44
func init () {
@@ -65,6 +66,8 @@ type MinioClient interface {
65
66
setBucketEncryption (ctx context.Context , bucketName string , config * sse.Configuration ) error
66
67
removeBucketEncryption (ctx context.Context , bucketName string ) error
67
68
getBucketEncryption (ctx context.Context , bucketName string ) (* sse.Configuration , error )
69
+ putObjectTagging (ctx context.Context , bucketName , objectName string , otags * tags.Tags , opts minio.PutObjectTaggingOptions ) error
70
+ getObjectTagging (ctx context.Context , bucketName , objectName string , opts minio.GetObjectTaggingOptions ) (* tags.Tags , error )
68
71
}
69
72
70
73
// Interface implementation
@@ -75,7 +78,7 @@ type minioClient struct {
75
78
client * minio.Client
76
79
}
77
80
78
- // implements minio.ListBucketsWithContext (ctx)
81
+ // implements minio.ListBuckets (ctx)
79
82
func (c minioClient ) listBucketsWithContext (ctx context.Context ) ([]minio.BucketInfo , error ) {
80
83
return c .client .ListBuckets (ctx )
81
84
}
@@ -162,6 +165,14 @@ func (c minioClient) getBucketEncryption(ctx context.Context, bucketName string)
162
165
return c .client .GetBucketEncryption (ctx , bucketName )
163
166
}
164
167
168
+ func (c minioClient ) putObjectTagging (ctx context.Context , bucketName , objectName string , otags * tags.Tags , opts minio.PutObjectTaggingOptions ) error {
169
+ return c .client .PutObjectTagging (ctx , bucketName , objectName , otags , opts )
170
+ }
171
+
172
+ func (c minioClient ) getObjectTagging (ctx context.Context , bucketName , objectName string , opts minio.GetObjectTaggingOptions ) (* tags.Tags , error ) {
173
+ return c .client .GetObjectTagging (ctx , bucketName , objectName , opts )
174
+ }
175
+
165
176
// MCClient interface with all functions to be implemented
166
177
// by mock when testing, it should include all mc/S3Client respective api calls
167
178
// that are used within this project.
0 commit comments