Is your feature request related to a problem? Please describe.
Currently, I'm tinkering with firebase_functions.
These use FirebaseApp from dart_firebase_admin and expose the app to the consumer.
The FirebaseApp itself provides core firebase services which use the package:googleapis_auth AuthClient.
However, some of these services (e.g. storage) have a trimmed down API, which isn't sufficient for all use cases.
For instance, my current requirement is being able to upload a large file to Cloud Storage (several GBs) and fetch the file in ranges.
The API provided by default only supports direct data uploads and full data downloads, which isn't feasible for large files.
Whereas the googleapis package provides a more complete API, which supports streaming uploads.
Thus, it would be great if the AuthClient was exposed as part of the actual public API, so consumers can use it
without having to re-implement the same initialization logic FirebaseApp does under the hood, and so we don't have
to have separate clients for interacting with the same services.
Describe the solution you'd like
Remove the @internal annotation and make AuthClient get client part of the public API.
|
/// Returns the HTTP client for this app. |
|
/// Lazily initializes on first access. |
|
@internal |
|
Future<googleapis_auth.AuthClient> get client { |
|
return _httpClient ??= options.httpClient != null |
|
? Future.value(options.httpClient!) |
|
: _createDefaultClient(); |
|
} |
Describe alternatives you've considered
Silence the warning and use the internal API.
Is your feature request related to a problem? Please describe.
Currently, I'm tinkering with
firebase_functions.These use
FirebaseAppfromdart_firebase_adminand expose the app to the consumer.The
FirebaseAppitself provides core firebase services which use thepackage:googleapis_authAuthClient.However, some of these services (e.g.
storage) have a trimmed down API, which isn't sufficient for all use cases.For instance, my current requirement is being able to upload a large file to Cloud Storage (several GBs) and fetch the file in ranges.
The API provided by default only supports direct data uploads and full data downloads, which isn't feasible for large files.
Whereas the
googleapispackage provides a more complete API, which supports streaming uploads.Thus, it would be great if the
AuthClientwas exposed as part of the actual public API, so consumers can use itwithout having to re-implement the same initialization logic
FirebaseAppdoes under the hood, and so we don't haveto have separate clients for interacting with the same services.
Describe the solution you'd like
Remove the
@internalannotation and makeAuthClient get clientpart of the public API.firebase-admin-dart/packages/dart_firebase_admin/lib/src/app/firebase_app.dart
Lines 138 to 145 in 4872123
Describe alternatives you've considered
Silence the warning and use the internal API.