谷歌刚刚发布了Cloud Firestore,这是他们针对应用的新文档数据库.
我一直在阅读文档但我没有看到Firestore和Firebase DB之间存在很多差异.
重点是Firestore使用的文档和集合与Firebase相比,可以轻松使用查询,Firebase是一个带有JSON基础的传统noSQL数据库.
我想更多地了解他们的差异或用法,或者Firestore是否刚刚取代Firebase DB?
firebase google-cloud-platform firebase-realtime-database google-cloud-firestore
我正在寻找一种方法来为Firebase安排云功能,或者换句话说,在特定时间触发它们.
我正在使用云功能在免费火花层上调用另一个云功能.
是否有一种特殊的方式来调用另一个云功能?或者您只是使用标准的http请求?
我试过直接调用其他函数:
exports.purchaseTicket = functions.https.onRequest((req, res) => {
fetch('https://us-central1-functions-****.cloudfunctions.net/validate')
.then(response => response.json())
.then(json => res.status(201).json(json))
})
Run Code Online (Sandbox Code Playgroud)
但是我得到了错误
FetchError:请求 https:// us-central1-functions-****.cloudfunctions.net/validate failed,reason:getaddrinfo ENOTFOUND us-central1-functions - *****.cloudfunctions.net us-central1-functions -*****cloudfunctions.net:443
哪个听起来像firebase阻止连接,尽管它是谷歌拥有的,因此它不应该被锁定
Spark计划仅允许对Google拥有的服务的出站网络请求.
如何使用云功能调用另一个云功能?
javascript node.js firebase google-cloud-platform google-cloud-functions
我想开发一个Google Cloud Functions端点,该端点将订阅对Google Cloud Storage存储桶的文件更改,并将该文件FTP到第三方FTP站点,该站点将客户端的IP地址列入白名单.
因此,可以为Google Cloud Functions容器获取静态IP地址?
我是Google Cloud FireStore的新手.
Document对象具有onSnapshot函数调用,用于附加DocumentSnapshot事件的侦听器.
是否有删除该侦听器的函数(如offSnapshot)?如果不是,我该如何实施呢?
我不确定该怎么说,但是,我感觉好像有些东西被Google更改了,而我却一无所知。我曾经从日志记录仪表板内Google Cloud Console中的python Cloud Functions中获取日志。现在,它刚刚停止工作。
所以我去研究了很长时间,我刚刚做了一个日志你好世界python Cloud Function:
import logging
def cf_endpoint(req):
logging.debug('log debug')
logging.info('log info')
logging.warning('log warning')
logging.error('log error')
logging.critical('log critical')
return 'ok'
Run Code Online (Sandbox Code Playgroud)
这是我的main.py,我将其部署为带有http触发器的Cloud Function。
由于我拥有所有“调试”级别日志的日志提取排除过滤器,因此在日志记录仪表板中什么都看不到。但是当我删除它时,我发现了这一点:
因此,似乎将python内置日志记录解析为stackdriver的操作停止了对日志严重性参数的解析!对不起,如果我看起来很傻,但这是我唯一能想到的:/
你们对此有任何解释或解决方案吗?我做错了吗?
预先感谢您的帮助。
logging python-3.x google-cloud-platform google-cloud-functions
ios firebase google-cloud-platform swift firebase-realtime-database
我正在浏览Google Cloud Functions文档,我想知道是否可以限制对给定网络的HTTP云功能的访问?我想避免任何人用尽免费配额.
云功能是否有任何防火墙规则或类似机制?
我正在尝试Google的云功能服务,我想阅读和编写Google Spreadsheets,但似乎无法找到任何示例或方法来执行此操作.
我的问题是因为Google云功能的示例javascript是:
exports.helloWorld = function helloWorld (req, res) {
res.send(`Hello ${req.body.name || 'World'}!`);
};
Run Code Online (Sandbox Code Playgroud)
这有效,但我想以google为例从谷歌电子表格中读取:
gapi.load('client:auth2', initClient);
function initClient() {
gapi.client.init({
discoveryDocs: DISCOVERY_DOCS,
clientId: CLIENT_ID,
scope: SCOPES
}).then(function () {
// Listen for sign-in state changes.
gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);
// Handle the initial sign-in state.
gapi.client.sheets.spreadsheets.values.get({
spreadsheetId: '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms',
range: 'Class Data!A2:E',
}).then(function(response) {
var range = response.result;
if (range.values.length > 0) {
appendPre('Name, Major:');
for (i = 0; i < range.values.length; i++) {
var row = range.values[i];
// Print columns A …Run Code Online (Sandbox Code Playgroud) 在下面的示例中,有没有办法获取写入'offers/{offerId}'的用户的用户ID(uid)?我试着像这里描述的那样做,但它在Firestore中不起作用.
exports.onNewOffer = functions.firestore
.document('offers/{offerId}')
.onCreate(event => {
...
});
Run Code Online (Sandbox Code Playgroud) node.js firebase google-cloud-platform google-cloud-functions google-cloud-firestore