aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3_constants/extend_key.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-07-12 21:58:55 -0700
committerGitHub <noreply@github.com>2025-07-12 21:58:55 -0700
commit1549ee2e154ab040e211ac7b3bc361272069abef (patch)
tree611da8241e78a40ab4d94524117b097403b46f35 /weed/s3api/s3_constants/extend_key.go
parent687a6a6c1de0fb67b51ec9bfd1781a6c255ff695 (diff)
downloadseaweedfs-1549ee2e154ab040e211ac7b3bc361272069abef.tar.xz
seaweedfs-1549ee2e154ab040e211ac7b3bc361272069abef.zip
implement PubObjectRetention and WORM (#6969)
* implement PubObjectRetention and WORM * Update s3_worm_integration_test.go * avoid previous buckets * Update s3-versioning-tests.yml * address comments * address comments * rename to ExtObjectLockModeKey * only checkObjectLockPermissions if versioningEnabled * address comments * comments * Revert "comments" This reverts commit 6736434176f86c6e222b867777324b17c2de716f. * Update s3api_object_handlers_skip.go * Update s3api_object_retention_test.go * add version id to ObjectIdentifier * address comments * add comments * Add proper error logging for timestamp parsing failures * address comments * add version id to the error * Update weed/s3api/s3api_object_retention_test.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update weed/s3api/s3api_object_retention.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * constants * fix comments * address comments * address comment * refactor out handleObjectLockAvailabilityCheck * errors.Is ErrBucketNotFound * better error checking * address comments --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Diffstat (limited to 'weed/s3api/s3_constants/extend_key.go')
-rw-r--r--weed/s3api/s3_constants/extend_key.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/weed/s3api/s3_constants/extend_key.go b/weed/s3api/s3_constants/extend_key.go
index 9806d899e..79fcbb239 100644
--- a/weed/s3api/s3_constants/extend_key.go
+++ b/weed/s3api/s3_constants/extend_key.go
@@ -11,4 +11,25 @@ const (
ExtETagKey = "Seaweed-X-Amz-ETag"
ExtLatestVersionIdKey = "Seaweed-X-Amz-Latest-Version-Id"
ExtLatestVersionFileNameKey = "Seaweed-X-Amz-Latest-Version-File-Name"
+
+ // Object Retention and Legal Hold
+ ExtObjectLockModeKey = "Seaweed-X-Amz-Object-Lock-Mode"
+ ExtRetentionUntilDateKey = "Seaweed-X-Amz-Retention-Until-Date"
+ ExtLegalHoldKey = "Seaweed-X-Amz-Legal-Hold"
+ ExtObjectLockEnabledKey = "Seaweed-X-Amz-Object-Lock-Enabled"
+ ExtObjectLockConfigKey = "Seaweed-X-Amz-Object-Lock-Config"
+)
+
+// Object Lock and Retention Constants
+const (
+ // Retention modes
+ RetentionModeGovernance = "GOVERNANCE"
+ RetentionModeCompliance = "COMPLIANCE"
+
+ // Legal hold status
+ LegalHoldOn = "ON"
+ LegalHoldOff = "OFF"
+
+ // Object lock enabled status
+ ObjectLockEnabled = "Enabled"
)