summaryrefslogtreecommitdiff
path: root/vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go
diff options
context:
space:
mode:
authorLibravatar kim <grufwub@gmail.com>2025-11-05 21:58:38 +0100
committerLibravatar tobi <tobi.smethurst@protonmail.com>2025-11-17 14:12:41 +0100
commitd0c551acb5ab79efafd325f5b19c76a3de835356 (patch)
treeba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go
parent[performance] when transforming media, perform read operations of large files... (diff)
downloadgotosocial-d0c551acb5ab79efafd325f5b19c76a3de835356.tar.xz
[chore] update dependencies (#4542)
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97 - github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0 - github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6 - codeberg.org/gruf/go-mmap: fixes build for BSD platforms Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
Diffstat (limited to 'vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go')
-rw-r--r--vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go28
1 files changed, 25 insertions, 3 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go b/vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go
index 24f94e034..3ae9fe279 100644
--- a/vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go
+++ b/vendor/github.com/minio/minio-go/v7/api-bucket-encryption.go
@@ -28,6 +28,14 @@ import (
)
// SetBucketEncryption sets the default encryption configuration on an existing bucket.
+// The encryption configuration specifies the default encryption behavior for objects uploaded to the bucket.
+//
+// Parameters:
+// - ctx: Context for request cancellation and timeout
+// - bucketName: Name of the bucket
+// - config: Server-side encryption configuration to apply
+//
+// Returns an error if the operation fails or if config is nil.
func (c *Client) SetBucketEncryption(ctx context.Context, bucketName string, config *sse.Configuration) error {
// Input validation.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
@@ -69,7 +77,15 @@ func (c *Client) SetBucketEncryption(ctx context.Context, bucketName string, con
return nil
}
-// RemoveBucketEncryption removes the default encryption configuration on a bucket with a context to control cancellations and timeouts.
+// RemoveBucketEncryption removes the default encryption configuration from a bucket.
+// After removal, the bucket will no longer apply default encryption to new objects.
+// It uses the provided context to control cancellations and timeouts.
+//
+// Parameters:
+// - ctx: Context for request cancellation and timeout
+// - bucketName: Name of the bucket
+//
+// Returns an error if the operation fails.
func (c *Client) RemoveBucketEncryption(ctx context.Context, bucketName string) error {
// Input validation.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {
@@ -97,8 +113,14 @@ func (c *Client) RemoveBucketEncryption(ctx context.Context, bucketName string)
return nil
}
-// GetBucketEncryption gets the default encryption configuration
-// on an existing bucket with a context to control cancellations and timeouts.
+// GetBucketEncryption retrieves the default encryption configuration from a bucket.
+// It uses the provided context to control cancellations and timeouts.
+//
+// Parameters:
+// - ctx: Context for request cancellation and timeout
+// - bucketName: Name of the bucket
+//
+// Returns the bucket's encryption configuration or an error if the operation fails.
func (c *Client) GetBucketEncryption(ctx context.Context, bucketName string) (*sse.Configuration, error) {
// Input validation.
if err := s3utils.CheckValidBucketName(bucketName); err != nil {