-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Bucket/Object lock operations (#320)
#### To Dos - Tests - [x] System - [x] Unit #### References - https://docs.google.com/document/d/1wRpiAxTHZoypR1NLVP97Cj0WCGVKx43Tivso0xXhyEA/edit?ts=5b60f543# - https://www.googleapis.com/discovery/v1/apis/storage/v1/rest This introduces new behavior: # Buckets - **bucket#lock()** Lock a previously-defined retention policy. This will prevent changes to the policy. - **bucket#removeRetentionPeriod()** Remove an already-existing retention policy from this bucket. - **bucket#setRetentionPeriod(durationInSeconds)** Lock all objects contained in the bucket, based on their creation time. # Files - **file#getExpirationDate()** Get a Date object representing the earliest time this file will expire. --- Additionally, `bucket#getMetadata()`, `bucket#setMetadata()`, `file#getMetadata()`, and `file#setMetadata()` are available if users wish to interact with the raw resource schemas as defined by the API.
- Loading branch information
1 parent
74beabc
commit 2b1ffaf
Showing
6 changed files
with
523 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.