From d0c551acb5ab79efafd325f5b19c76a3de835356 Mon Sep 17 00:00:00 2001 From: kim Date: Wed, 5 Nov 2025 21:58:38 +0100 Subject: [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 Co-committed-by: kim --- .../minio/minio-go/v7/api-bucket-policy.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/minio/minio-go/v7/api-bucket-policy.go') diff --git a/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go b/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go index 3a168c13e..0e561bdfa 100644 --- a/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go +++ b/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go @@ -26,7 +26,16 @@ import ( "github.com/minio/minio-go/v7/pkg/s3utils" ) -// SetBucketPolicy sets the access permissions on an existing bucket. +// SetBucketPolicy sets the access permissions policy on an existing bucket. +// The policy should be a valid JSON string that conforms to the IAM policy format. +// If policy is an empty string, the existing bucket policy will be removed. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// - policy: JSON policy string (empty string to remove existing policy) +// +// Returns an error if the operation fails. func (c *Client) SetBucketPolicy(ctx context.Context, bucketName, policy string) error { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { @@ -95,7 +104,14 @@ func (c *Client) removeBucketPolicy(ctx context.Context, bucketName string) erro return nil } -// GetBucketPolicy returns the current policy +// GetBucketPolicy retrieves the access permissions policy for the bucket. +// If no bucket policy exists, returns an empty string with no error. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// +// Returns the policy as a JSON string or an error if the operation fails. func (c *Client) GetBucketPolicy(ctx context.Context, bucketName string) (string, error) { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { -- cgit v1.2.3