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-object-retention.go | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/minio/minio-go/v7/api-object-retention.go') diff --git a/vendor/github.com/minio/minio-go/v7/api-object-retention.go b/vendor/github.com/minio/minio-go/v7/api-object-retention.go index b29cb1f8d..2efb5d89a 100644 --- a/vendor/github.com/minio/minio-go/v7/api-object-retention.go +++ b/vendor/github.com/minio/minio-go/v7/api-object-retention.go @@ -62,7 +62,16 @@ type PutObjectRetentionOptions struct { VersionID string } -// PutObjectRetention sets object retention for a given object and versionID. +// PutObjectRetention sets the retention configuration for an object and specific version. +// Object retention prevents an object version from being deleted or overwritten for a specified period. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// - objectName: Name of the object +// - opts: Options including Mode (GOVERNANCE or COMPLIANCE), RetainUntilDate, optional VersionID, and GovernanceBypass +// +// Returns an error if the operation fails or if the retention settings are invalid. func (c *Client) PutObjectRetention(ctx context.Context, bucketName, objectName string, opts PutObjectRetentionOptions) error { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { @@ -125,7 +134,15 @@ func (c *Client) PutObjectRetention(ctx context.Context, bucketName, objectName return nil } -// GetObjectRetention gets retention of given object. +// GetObjectRetention retrieves the retention configuration for an object and specific version. +// +// Parameters: +// - ctx: Context for request cancellation and timeout +// - bucketName: Name of the bucket +// - objectName: Name of the object +// - versionID: Optional version ID to target a specific version (empty string for current version) +// +// Returns the retention mode (GOVERNANCE or COMPLIANCE), retain-until date, and any error. func (c *Client) GetObjectRetention(ctx context.Context, bucketName, objectName, versionID string) (mode *RetentionMode, retainUntilDate *time.Time, err error) { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { -- cgit v1.2.3