Storage list by AustinBenoit · Pull Request #1842 · firebase/firebase-cpp-sdk
Summary of Changes
Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a significant new feature to the Storage SDK: a List API. This API allows developers to efficiently browse and manage the contents of their storage buckets by retrieving lists of files and sub-folders, with support for pagination to handle large datasets. This enhancement provides a more robust and flexible way to interact with stored data.
Highlights
- New List API: Added a new
ListAPI to the Storage SDK, enabling users to retrieve a paginated list of files and prefixes within a storage reference across all supported platforms (Android, iOS, Desktop). - Cross-Platform Implementation: Implemented the
ListAPI functionality for Android, iOS, and Desktop platforms, ensuring consistent behavior and integration with native SDKs where applicable. - Integration Testing: Included a new integration test to validate the functionality of the
ListAPI, covering basic listing and pagination scenarios.
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.
Changelog
- release_build_files/readme.md
- Updated release notes to announce the addition of the Storage
ListAPI.
- Updated release notes to announce the addition of the Storage
- storage/CMakeLists.txt
- Added
src/common/list_result.ccto the build configuration.
- Added
- storage/integration_test/src/integration_test.cc
- Introduced
TestListto verify the newListAPI, including pagination and handling of prefixes and items.
- Introduced
- storage/src/android/storage_reference_android.cc
- Added JNI method lookups for
ListandListWithTokenmethods. - Implemented logic within
FutureCallbackto processListResultobjects returned from the Java SDK.
- Added JNI method lookups for
- storage/src/android/storage_reference_android.h
- Included
firebase/storage/list_result.h. - Declared
ListandListLastResultmethods for the Android internal implementation.
- Included
- storage/src/common/list_result.cc
- Added implementation for the
StorageListResultclass, managing prefixes, items, and next page tokens.
- Added implementation for the
- storage/src/common/list_result_internal.h
- Added an internal header defining
StorageListResultInternalto manage the data forStorageListResult.
- Added an internal header defining
- storage/src/common/storage_reference.cc
- Implemented the public
ListandListLastResultmethods, delegating to the internal implementation.
- Implemented the public
- storage/src/desktop/curl_requests.cc
- Added
ReturnedListResponseto handle and parse JSON responses from the REST API for list operations, converting them intoStorageListResultobjects.
- Added
- storage/src/desktop/curl_requests.h
- Declared the
ReturnedListResponseclass for processing list API responses.
- Declared the
- storage/src/desktop/storage_reference_desktop.cc
- Implemented the desktop version of the
ListAPI, constructing REST API requests with appropriate parameters for prefixes, max results, and page tokens.
- Implemented the desktop version of the
- storage/src/desktop/storage_reference_desktop.h
- Added new
StorageReferenceFnenums forkStorageReferenceFnListandkStorageReferenceFnListInternal. - Declared
ListandListLastResultmethods for the desktop internal implementation.
- Added new
- storage/src/include/firebase/storage/list_result.h
- Added a new public header defining the
StorageListResultclass, which encapsulates the results of a list operation.
- Added a new public header defining the
- storage/src/include/firebase/storage/storage_reference.h
- Included
firebase/storage/list_result.h. - Added public declarations for the
ListandListLastResultmethods to theStorageReferenceclass.
- Included
- storage/src/ios/storage_reference_ios.h
- Included
firebase/storage/list_result.h. - Declared
ListandListLastResultmethods for the iOS internal implementation.
- Included
- storage/src/ios/storage_reference_ios.mm
- Implemented the iOS version of the
ListAPI, integrating withFIRStorageReferenceand handling completion blocks to convert native results to C++StorageListResultobjects.
- Implemented the iOS version of the
Activity
- AustinBenoit created this pull request to add a new feature.
- The author has added a new integration test to ensure the new functionality works as expected.
- Testing was performed by running the new integration test in the test runner.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩