Reputation: 99
New to firestore and gRPC in general. I've been trying to figure out how to interact with the Firestore RPC API from golang. They document the API well here, but do not show how to initialize the connections. Some questions I have are,
Cheers.
Edit: I have been able to connect thanks to Anar. But I can't test anything because Im not really sure how to authenticate or create a record. Any help with an example would be great. Code so far:
conn, err := grpc.Dial("firestore.googleapis.com", grpc.WithInsecure())
if err != nil {
log.Fatalln(err)
}
defer conn.Close()
Upvotes: 0
Views: 2743
Reputation: 360
You must use google.golang.org/grpc package
As documentation you must use firestore.googleapis.com
to create client stub.
3.You don't need it proto file locally. you can just create grpc client and use server methods which available here: https://cloud.google.com/firestore/docs/reference/rpc
Upvotes: 1