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",

events/generate/data/firebase-db6-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-db6-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-db7-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-db7-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-db8-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-db8-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-dbdelete1-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.deleted",
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-dbdelete1-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.deleted",
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-dbdelete2-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.deleted",
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-dbdelete2-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.deleted",
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/firestore_complex-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.cloud.firestore.document.v1.written",
4-
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)/documents/gcf-test/IH75dRdeYJKd4uuQiqch",
4+
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)",
5+
"subject": "documents/gcf-test/IH75dRdeYJKd4uuQiqch",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firestore_complex-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.cloud.firestore.document.v1.written",
4-
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)/documents/gcf-test/IH75dRdeYJKd4uuQiqch",
4+
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)",
5+
"subject": "documents/gcf-test/IH75dRdeYJKd4uuQiqch",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firestore_simple-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.cloud.firestore.document.v1.written",
4-
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)/documents/gcf-test/2Vm2mI1d0wIaK2Waj5to",
4+
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)",
5+
"subject": "documents/gcf-test/IH75dRdeYJKd4uuQiqch",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

events/generate/data/firestore_simple-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.cloud.firestore.document.v1.written",
4-
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)/documents/gcf-test/2Vm2mI1d0wIaK2Waj5to",
4+
"source": "//firestore.googleapis.com/projects/project-id/databases/(default)",
5+
"subject": "documents/gcf-test/IH75dRdeYJKd4uuQiqch",
56
"id": "aaaaaa-1111-bbbb-2222-cccccccccccc",
67
"time": "2020-09-29T11:32:00.000Z",
78
"datacontenttype": "application/json",

0 commit comments

Comments
 (0)