Kubemq firebase target Connector
Kubemq gcp-firebase target connector allows services using kubemq server to access google firebase server.
Prerequisites
The following required to run the gcp-firebase target connector:
Configuration
firebase target connector configuration properties:
defaultmsg - can be used for common message settings defaultmultimsg - can be used for common message settings
Example:
Copy bindings :
- name : kubemq-query-gcp-firebase
source :
kind : kubemq.query
name : kubemq-query
properties :
address : "kubemq-cluster:50000"
client_id : "kubemq-query-gcp-firebase-connector"
auth_token : ""
channel : "query.gcp.firebase"
group : ""
auto_reconnect : "true"
reconnect_interval_seconds : "1"
max_reconnects : "0"
target :
kind : gcp.firebase
name : gcp-firebase
properties :
project_id : "project_id"
credentials : 'json'
db_client : "true"
db_url : "db_url"
auth_client : "true"
Usage
DB:
Get DB
Get DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "get_db" ,
"ref_path" : "string"
} ,
"data" : null
}
Set DB
Set DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "get_db" ,
"ref_path" : "string"
} ,
"data" : null
}
Update DB
Update DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "delete_db" ,
"ref_path" : "string"
} ,
"data" : "updated_string"
}
Delete DB
Kubemq firebase target Connector
Kubemq gcp-firebase target connector allows services using kubemq server to access google firebase server.
Prerequisites
The following required to run the gcp-firebase target connector:
Configuration
firebase target connector configuration properties:
defaultmsg - can be used for common message settings defaultmultimsg - can be used for common message settings
Example:
Copy bindings :
- name : kubemq-query-gcp-firebase
source :
kind : kubemq.query
name : kubemq-query
properties :
address : "kubemq-cluster:50000"
client_id : "kubemq-query-gcp-firebase-connector"
auth_token : ""
channel : "query.gcp.firebase"
group : ""
auto_reconnect : "true"
reconnect_interval_seconds : "1"
max_reconnects : "0"
target :
kind:gcp.firebase
name : gcp-firebase
properties :
project_id : "project_id"
credentials : 'json'
db_client : "true"
db_url : "db_url"
auth_client : "true"
Usage
DB:
Get DB
Get DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "get_db" ,
"ref_path" : "string"
} ,
"data" : null
}
Set DB
Set DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "get_db" ,
"ref_path" : "string"
} ,
"data" : null
}
Update DB
Update DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "update_db" ,
"ref_path" : "string"
} ,
"data" : "dXBkYXRlIGRiIHN0cmluZw=="
}
Delete DB
Delete DB metadata setting:
Example:
Copy {
"metadata" : {
"method" : "delete_db" ,
"ref_path" : "string"
} ,
"data" : null
}
User:
Create User
Create User metadata setting:
Example:
Copy {
"metadata" : {
"method" : "create_user"
} ,
"data" : "eyJlbWFpbCI6IkpvaG5AZHVlLmNvbSIsICJwYXNzd29yZCI6MzAsICJkaXNwbGF5X25hbWUiOiJKb2huIn0="
}
Retrieve User
Retrieve User metadata setting:
Example:
Copy {
"metadata" : {
"method" : "retrieve_user" ,
"retrieve_by" : "uid" ,
"uid" : "1223131"
} ,
"data" : null
}
Delete User
Delete User metadata setting:
Example:
Copy {
"metadata" : {
"method" : "delete_user" ,
"uid" : "1223131"
} ,
"data" : null
}
Delete Multiple Users
Delete Multiple Users metadata setting:
Example:
Copy {
"metadata" : {
"method" : "delete_multiple_users"
} ,
"data" : "WyAidXNlcjEiLCAidXNlcjIiLCAidXNlcjMiIF0="
}
Update User
Update User metadata setting:
Example:
Copy {
"metadata" : {
"method" : "update_user" ,
"uid" : "1223131"
} ,
"data" : "eyJlbWFpbCI6IkpvaG5AZHVlLmNvbSIsICJwYXNzd29yZCI6MzAsICJkaXNwbGF5X25hbWUiOiJKb2huIn0="
}
List Users
List User metadata setting:
Example:
Copy {
"metadata" : {
"method" : "list_users"
} ,
"data" : null
}
Token:
Custom Token
Custom Token metadata setting:
Example:
Copy {
"metadata" : {
"method" : "custom_token" ,
"token_id" : "some-uid"
} ,
"data" : null
}
Verify Token
Verify Token metadata setting:
Example:
Copy {
"metadata" : {
"method" : "verify_token" ,
"token_id" : "some-uid"
} ,
"data" : null
}
Messaging:
Firebase messaging will send a FCM message or send the message to multiple devices.
Send Message
Create User metadata setting:
Example: send_message
Copy {
"metadata" : {
"method" : "send_message"
} ,
"data" : "ewoiVG9waWMiOiJ0ZXN0IiwKImRhdGEiOiB7ImtleTEiOiJ2YWx1ZTEifQp9"
}
* data value is base64 {
"Topic" : "test" ,
"data" : { "key1" : "value1" }
}
Example: send_multi
Copy {
"metadata" : {
"method" : "send_multi"
} ,
"data": "ewogICAgInRvcGljIjoiYXBwIHRvcGljIiwKICAgICAiZGF0YSI6eyJUb2tlbnMiOlsiMTIzIiwiNDU2Il0sIkRhdGEiOnsia2V5IjoidmFsIn0sIk5vdGlmaWNhdGlvbiI6eyJ0aXRsZSI6InRpdGxlIn19CiB9"
}
* data value is base64 {
"topic" : "app_topic" ,
"data" :{ "Tokens" : [ "123" , "456" ] , "Data" : { "key" : "val" } , "Notification" : { "title" : "title" }}
}