Add put object retention api (#340)

This commit is contained in:
Cesar N
2020-10-23 15:04:02 -07:00
committed by GitHub
parent fce361e5bd
commit 0325bb7e2d
12 changed files with 1131 additions and 6 deletions

View File

@@ -60,6 +60,7 @@ type MinioClient interface {
getObjectLegalHold(ctx context.Context, bucketName, objectName string, opts minio.GetObjectLegalHoldOptions) (status *minio.LegalHoldStatus, err error)
putObject(ctx context.Context, bucketName, objectName string, reader io.Reader, objectSize int64, opts minio.PutObjectOptions) (info minio.UploadInfo, err error)
putObjectLegalHold(ctx context.Context, bucketName, objectName string, opts minio.PutObjectLegalHoldOptions) error
putObjectRetention(ctx context.Context, bucketName, objectName string, opts minio.PutObjectRetentionOptions) error
}
// Interface implementation
@@ -138,6 +139,10 @@ func (c minioClient) putObjectLegalHold(ctx context.Context, bucketName, objectN
return c.client.PutObjectLegalHold(ctx, bucketName, objectName, opts)
}
func (c minioClient) putObjectRetention(ctx context.Context, bucketName, objectName string, opts minio.PutObjectRetentionOptions) error {
return c.client.PutObjectRetention(ctx, bucketName, objectName, opts)
}
// MCClient interface with all functions to be implemented
// by mock when testing, it should include all mc/S3Client respective api calls
// that are used within this project.