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-object-legal-hold.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-object-legal-hold.go')
| -rw-r--r-- | vendor/github.com/minio/minio-go/v7/api-object-legal-hold.go | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/vendor/github.com/minio/minio-go/v7/api-object-legal-hold.go b/vendor/github.com/minio/minio-go/v7/api-object-legal-hold.go index 0c027d550..5ad9a4943 100644 --- a/vendor/github.com/minio/minio-go/v7/api-object-legal-hold.go +++ b/vendor/github.com/minio/minio-go/v7/api-object-legal-hold.go @@ -80,7 +80,16 @@ func newObjectLegalHold(status *LegalHoldStatus) (*objectLegalHold, error) { return legalHold, nil } -// PutObjectLegalHold : sets object legal hold for a given object and versionID. +// PutObjectLegalHold sets the legal hold status for an object and specific version. +// Legal hold prevents an object version from being overwritten or deleted, regardless of retention settings. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// - objectName: Name of the object +// - opts: Options including Status (LegalHoldEnabled or LegalHoldDisabled) and optional VersionID +// +// Returns an error if the operation fails or if the status is invalid. func (c *Client) PutObjectLegalHold(ctx context.Context, bucketName, objectName string, opts PutObjectLegalHoldOptions) error { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { @@ -134,7 +143,15 @@ func (c *Client) PutObjectLegalHold(ctx context.Context, bucketName, objectName return nil } -// GetObjectLegalHold gets legal-hold status of given object. +// GetObjectLegalHold retrieves the legal hold status for an object and specific version. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// - objectName: Name of the object +// - opts: Options including optional VersionID to target a specific version +// +// Returns the legal hold status (LegalHoldEnabled or LegalHoldDisabled) or an error if the operation fails. func (c *Client) GetObjectLegalHold(ctx context.Context, bucketName, objectName string, opts GetObjectLegalHoldOptions) (status *LegalHoldStatus, err error) { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { |
