Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for listing R2 buckets #1063

Merged
merged 3 commits into from
Nov 20, 2022

Conversation

rgcostea
Copy link
Contributor

Description

Added the ability to list R2 buckets. A recent change (#1028) added support for creating and deleting R2 buckets but was missing the ability to list R2 buckets. This change adds support for listing R2 buckets.

Has your change been tested?

Enhanced r2_bucket_test.go with an additional test (TestR2_ListBuckets) to list R2 buckets. Also verified this against an active cloudflare account.

Types of changes

What sort of change does your code introduce/modify?

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • This change is using publicly documented (api.cloudflare.com or developers.cloudflare.com) and stable APIs.

@rgcostea rgcostea changed the title Add support for list R2 buckets Add support for listing R2 buckets Aug 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 26, 2022

changelog detected ✅

@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2022

Codecov Report

Merging #1063 (9387c77) into master (e39278e) will increase coverage by 0.14%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #1063      +/-   ##
==========================================
+ Coverage   49.94%   50.09%   +0.14%     
==========================================
  Files         115      121       +6     
  Lines       10991    11737     +746     
==========================================
+ Hits         5490     5880     +390     
- Misses       4338     4571     +233     
- Partials     1163     1286     +123     
Impacted Files Coverage Δ
teams_accounts.go 53.84% <ø> (ø)
r2_bucket.go 75.67% <52.63%> (-24.33%) ⬇️
api_shield.go 53.84% <53.84%> (ø)
workers.go 69.38% <66.66%> (-0.04%) ⬇️
cloudflare.go 68.71% <100.00%> (+1.50%) ⬆️
email_routing_settings.go 60.00% <100.00%> (ø)
images.go 50.34% <100.00%> (-0.35%) ⬇️
split_tunnel.go 40.38% <0.00%> (-13.47%) ⬇️
teams_list.go 52.72% <0.00%> (-7.61%) ⬇️
access_service_tokens.go 64.70% <0.00%> (-3.72%) ⬇️
... and 46 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Cyb3r-Jak3
Copy link
Contributor

@jacobbednarz This seems to have landed https://api.cloudflare.com/#r2-bucket-list-buckets. It does support pagination with cursors

@jacobbednarz jacobbednarz merged commit 8c22b9a into cloudflare:master Nov 20, 2022
@github-actions github-actions bot added this to the v0.55.0 milestone Nov 20, 2022
@jacobbednarz
Copy link
Member

thanks @Cyb3r-Jak3 . bumped the method signature too to get the customisations into it.

github-actions bot pushed a commit that referenced this pull request Nov 20, 2022
@rgcostea rgcostea deleted the r2-list-buckets branch November 21, 2022 13:08
@github-actions
Copy link
Contributor

This functionality has been released in v0.55.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants