Firestore
Kubemq gcp-firestore target connector allows services using kubemq server to access google firestore server.

Prerequisites

The following required to run the gcp-firestore target connector:
  • kubemq cluster
  • gcp-firestore set up in native mode
  • kubemq-source deployment

Configuration

firestore target connector configuration properties:
Properties Key
Required
Description
Example
project_id
yes
gcp firestore project_id
"/myproject"
credentials
yes
gcp credentials files
"<google json credentials"
Example:
1
bindings:
2
- name: kubemq-query-gcp-firestore
3
source:
4
kind: kubemq.query
5
name: kubemq-query
6
properties:
7
address: "kubemq-cluster:50000"
8
client_id: "kubemq-query-gcp-firestore-connector"
9
auth_token: ""
10
channel: "query.gcp.firestore"
11
group: ""
12
auto_reconnect: "true"
13
reconnect_interval_seconds: "1"
14
max_reconnects: "0"
15
target:
16
kind: gcp.firestore
17
name: gcp-firestore
18
properties:
19
project_id: "id"
20
credentials: 'json'
21
instance: "instance"
Copied!

Usage

Add Key

add a key under collection
Add Key metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"add"
collection
yes
the name of the collection to sent to
"collection name"
Example:
1
{
2
"metadata": {
3
"method": "add",
4
"collection": "my_collection"
5
},
6
"data": "QWRkIFZhbHVl"
7
}
Copied!

get Values by document key

get values by key under collection
Get Key metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"document_key"
collection
yes
the name of the collection to sent to
"collection name"
document_key
yes
the name of the key to get his value
"valid existing key"
Example:
1
{
2
"metadata": {
3
"method": "documents_all",
4
"collection": "my_collection",
5
"item": "<valid existing key>"
6
},
7
"data": null
8
}
Copied!

get all Values

get all values under collection
Get all metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"documents_all"
collection
yes
the name of the collection to sent to
"collection name"
Example:
1
{
2
"metadata": {
3
"method": "documents_all",
4
"collection": "my_collection"
5
},
6
"data": null
7
}
Copied!

delete key

delete key in collection
Delete key metadata setting:
Metadata Key
Required
Description
Possible values
method
yes
type of method
"delete_document_key"
collection
yes
the name of the collection to sent to
"collection name"
document_key
yes
the name of the key to delete his value
"valid existing key"
Example:
1
{
2
"metadata": {
3
"method": "delete_document_key",
4
"collection": "my_collection",
5
"item": "valid existing key"
6
},
7
"data": null
8
}
Copied!
Last modified 11mo ago