Closed rpodcast closed 7 years ago
Thanks for your review @sckott! I've added comments above and pushed the updates.
spaces
within spaces
functionI finally got a chance to make updates and address your latest comments. Please take a look and let me know if you see other areas that need revisions.
Looks good @thercast
Let's merge this, then we can go back to #136 and discuss how to divy up tasks
Description
This PR brings preliminary support for utilizing the digital ocean spaces object storage API. The spaces API is backward-compatible with the Amazon S3 object storage API, so I leverage key functions from the
aws.s3
package to work with the API. Since the authentication is controlled by separate keys from the normal digital ocean API, the user is expected to create these keys within their DO spaces account, and the user can pass the key ID and secret directly in the functions or define them as environment variables (DO_SPACES_ACCESS_KEY
andDO_SPACES_SECRET_KEY
). The main functions introduced are the following:spaces()
: Obtain all spaces in your account. Each one will be given a class calledspace
with customprint
andsummary
S3 methods.spaces_GET()
: Supporting function that wrapsaes.se::s3HTTP()
to obtain the spaces information using the API.space_info()
: Obtain metadata around all files contained in a space. Note that if the space contains more than 1,000 files that this operation can take a bit of time, since the S3 API only allows for up to 1,000 files to be queried at a time.Related Issue
136
Example