diff options
| author | 2025-11-05 21:58:38 +0100 | |
|---|---|---|
| committer | 2025-11-17 14:12:41 +0100 | |
| commit | d0c551acb5ab79efafd325f5b19c76a3de835356 (patch) | |
| tree | ba9462cdc5081015fbd6bf5d98d9f39334d13207 /vendor/github.com/minio/minio-go/v7/api-bucket-policy.go | |
| parent | [performance] when transforming media, perform read operations of large files... (diff) | |
| download | gotosocial-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-policy.go')
| -rw-r--r-- | vendor/github.com/minio/minio-go/v7/api-bucket-policy.go | 20 |
1 files changed, 18 insertions, 2 deletions
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 { |
