-
Notifications
You must be signed in to change notification settings - Fork 52
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
Feature to export group of functions #46
Comments
I was not aware that it's possible to do this way. Could you point me at the docs in JS SDK where this is mentioned? I'd be curious to see if this works for HTTPS triggers as well (I'd assume not). |
Found it (couldn't this morning): for HTTPS, It does actually, because the actually function name when deployed is converted to 'alphabet-functionA' (with the dash) (assuming that was your concern) |
Ok, thanks. Good to know, it might be something recent they added as I don't remember this details the last time a read this doc. I'd probably approach it by adding a new // This is pseudo code
class FunctionGroup {
final Object _group = newObject();
operator []=(String key, dynamic function) {
setProperty(_group, key, function);
}
}
// ...
class FirebaseFunctions {
// ...
operator []=(String key, dynamic function) {
if (function is FunctionGroup) {
setExport(key, function._group);
} else {
setExport(key, function);
}
}
} |
that sounds good. /// as Base
abstract class FirebaseFunction {}
class DatabaseFunctions extends FirebaseFunction {
final js.FirebaseFunctions _functions;
DatabaseFunctions._(this._functions);
/// Returns reference builder for specified [path] in Realtime Database.
RefBuilder ref(String path) =>
new RefBuilder._(_functions.database.ref(path));
}
/// OR as interface
class IsFirebaseFunction {}
class DatabaseFunctions implements IsFirebaseFunction {...}
What do you think? |
Could we add feature to support adding function into a newObject and then to functions exports.
Let's say if I want to deploy two function functionA and functionB in group alphabet this way:
at the moment, I would set it up like this
The text was updated successfully, but these errors were encountered: