Skip to content

Commit 3a1ee52

Browse files
committed
Fix Firestore/Firebase test data
- Use firebasedatabase as the host for the Firebase RTDB source - Split the resource name up into source/subject There's more to do with Firebase/Firestore CloudEvents, but this is a step in the right direction. The precise format is still being worked on, and we'll update the mapping docs along with the events when the format is finalized.
1 parent 85b25b4 commit 3a1ee52

24 files changed

+48
-24
lines changed

events/generate/data/firebase-db1-cloudevent-input.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db1-cloudevent-output.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db2-cloudevent-input.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db2-cloudevent-output.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db3-cloudevent-input.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db3-cloudevent-output.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db4-cloudevent-input.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db4-cloudevent-output.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db5-cloudevent-input.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firebase-db5-cloudevent-output.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"specversion": "1.0",
33
"type": "google.firebase.database.document.v1.written",
4-
"source": "//firebase.googleapis.com/projects/_/instances/my-project-id/refs/gcf-test/xyz",
4+
"source": "//firebasedatabase.googleapis.com/projects/_/instances/my-project-id",
5+
"subject": "refs/gcf-test/xyz",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

0 commit comments

Comments
 (0)