【问题标题】:How to import firestore's RPC api/definitions in a .proto file?如何在 .proto 文件中导入 firestore 的 RPC api/定义?
【发布时间】:2018-12-20 14:13:03
【问题描述】:

编写一个 scala 应用程序用于与 firestore 的 RPC api 交互,并使用 scalapb proto 编译器 /akka-grpc 中间件,如何在 .proto 文件中导入 firestore RPC API 的定义?例如。如何导入Document 定义?

试图简单地说import "google.firestore.v1beta1.Document"; 会出错。

【问题讨论】:

    标签: scala sbt google-cloud-firestore scalapb akka-grpc


    【解决方案1】:

    看看 https://github.com/thesamet/sbt-protoc/blob/master/examples/multi-with-external-jar/build.sbt
    您需要添加libraryDependencies += "com.google.api.grpc" % "proto-google-cloud-firestore-v1beta1" % "0.37.0" % "protobuf",即 将使sbt-protoc 将 protos 提取到的子目录中 target/protobuf_external如果你想让ScalaPB生成Scala类 为他们,然后也添加PB.protoSources in Compile += target.value / "protobuf_external" / "com" / "google"

    【讨论】:

      猜你喜欢
      • 2020-06-25
      • 2019-12-10
      • 1970-01-01
      • 2020-03-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-04
      相关资源
      最近更新 更多