云function“event =>”文档
我对云function很陌生,我认为它们很酷。 我已经search了可以由“event”调用的方法的完整列表以及如何使用它们的文档,但是我没有find任何方法。 在下面的代码事件的例子是用来调用data.current.child等。有人可以帮助我find“事件”下方法的文档。
exports.getPath = functions.database.ref('/Transaction/{id}') .onWrite(event => { // Grab the current value of what was written to the Realtime Database. const trans = event.data.current.child('Request').val();
这里提供了云functionEvent
界面的文档。
事件中的数据取决于事件types。 每个类都有:
-
AnalyticsEvent
for Analytics事件 -
UserRecord
用于Auth事件。 -
DeltaSnapshot
实时数据库事件。 -
Message
为Pub / Sub事件。 - 存储事件的
ObjectMetadata