草庐IT

Firebase-cloud-messaging

全部标签

在listView中显示textView和firebase的图像

我在数据库中有:我想将所有数据显示到ListView,没有错误,但没有向我展示文本和图像。我有一个模型类:publicclassModelClass{Stringtitle,image;publicModelClass(Stringtitle,Stringimage){this.image=image;this.title=title;}publicModelClass(){}publicStringgetTitle(){returntitle;}publicvoidsetTitle(Stringtitle){this.title=title;}publicStringgetImage(){r

如何在Angular应用程序上使用firebase对象

我是编码的新手,非常感谢。我试图使用firebase对象作为JavaScript数组,使用$范围在HTML上使用它。最好的方法是什么?数据库:数据库我在用:varmainApp=angular.module("bookWorm",[]);mainApp.controller('bookController',function($scope,$http){varref=firebase.database().ref("Fiction");ref.once("value",function(snapshot){console.log(snapshot.val());$scope.fiction=s

go - Cloud EndPoint GRPC 不匹配原型(prototype)定义

我正在使用GoogleCloudEndPoints访问以GoLang编写并在Kuberkules中运行的GRPC服务器。我正在关注here的教程.一切正常,但当我尝试请求时出现此错误rpc错误:code=NotFounddesc=方法不存在。EndPoint没有保存URL在我的原型(prototype)文件中有一个,名称中包含包。这是一个例子:logrequest在最后一个请求中,我更改了生成的protobuf文件中url的值,它通过了端点,但我的服务器不识别它......我得到了这个错误:rpcerror:code=Unimplementeddesc=unknownservicecl

go - 使用代理连接到 Google Cloud SQL——错误 403 : Insufficient Permission

EDIT:我现在认为问题出在我的Golangpod通过本地主机与代理pod通信,如第二条错误消息所示。我将服务帐户凭据JSON文件添加到我的Docker镜像的GOOGLE_APPLICATION_CREDENTIALS环境变量中。这样做之后,使用my-project:us-central1:my-instance作为下面的connName就可以了。但是,当我尝试使用容器中的DB_HOST环境变量作为connName时,我仍然收到以下404错误。ORIGINALPOST我正在关注thisguide从KubernetesEngine上的pod连接到GoogleCloudSQL。该pod正在

google-cloud-platform - `datastore: invalid entity type` 来自 `datastore.NewQuery("的错误 ").Ancestor(myKey)`

我在我的Go应用程序中使用"cloud.google.com/go/datastore"库(下面的库版本),遇到错误datastore:invalidentity当我使用Ancestor()查询时键入。这是我的方法调用:ctx:=context.Background()client,err:=datastore.NewClient(ctx,"MyProjectId",option.WithCredentialsFile(myJsonFile))//...errcheck...myId:=112233myKey:=datastore.IDKey("MyKind",myId,nil)que

go - 如何在 Minio SDK 中设置 Content-MD5 header 以上传到 IBM Cloud Object Storage?

当我使用MinioGolangSDK将文件上传到S3时,我试图设置Content-MD5header。我可以在不设置Content-MD5的情况下成功将文件上传到AWS,但上传到IBMCloudObjectStorage失败并出现以下错误:ERR:Objectwritefailed,reason:Missingrequiredheaderforthisrequest:Content-MD5根据MinioSDK,https://docs.minio.io/docs/golang-client-api-reference#FPutObject我使用minio.PutObjectOption

firebase - 构建包含 firebase 凭证文件 .json 的 golang

我写了一个Golang程序,旨在解析一个scv文件并将数据上传到FireStore,这个程序的目的是与那些只写scv路径来上传信息的人分享。我用它来使用firebase-admin:opt:=option.WithCredentialsFile("path/to/serviceAccountKey.json")这种方法在我这样做时效果很好:$gorunmain.go但是当我构建项目并执行二进制文件时,我得到了这个:$cannotreadcredentialsfile:openfirebase-config.json:nosuchfileordirectory我做了readthisapp

firebase - 在 App Engine 标准 Golang 中初始化 Firebase Admin

我使用的是golang应用引擎标准。我在使用firebase时不断收到403错误。这是我用于传递firebase凭据的代码。这个apikey是什么?我做错了什么?错误:googleapi:错误403:请求缺少有效的APIkey。,禁止credJSON:=[]byte("{...jsonfromfirebaseconsole...}")creds,err:=google.CredentialsFromJSON(ctx,credJSON,"https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/

去 source.cloud.google.com 获取

我有一个托管在source.cloud.google.com上的项目。我希望使用goget和gomodules来管理它。当我执行goget时,我得到以下信息:$gogetsource.cloud.google.com//gogetsource.cloud.google.com//:unrecognizedimportpath"source.cloud.google.com//"(parsehttps://source.cloud.google.com//?go-get=1:nogo-importmetatags())有人让这个工作吗? 最佳答案

firebase - 在 Firestore 中忽略 Nil 值的最佳实践

我正在使用Golang(用于API定义的Go-Swagger)和Firestore作为我的文档存储来构建自定义网络服务。一切正常,除了在更新数据库时变得“尴尬”。我有一个解决方案,但我不相信它是最优雅的。有没有其他人遇到过这个,他们是如何解决的....问题陈述:当我写入数据库时​​,Nil值正在覆盖firebase中的现有值建议的解决方案-我的API在可选参数上有json:"omitempty"并且将传入nil值(而不是获取默认的golang值)。我计划将Struct传递到API中,并一次将一个attr填充到firestore正在使用的我的Struct中。我有性能问题,但不想将我的AP