googleapis/google-cloudevents-nodejs

Provide more direct guidance on event type usage

Closed this issue · 2 comments

Expected Behavior

Either a sample for each event type in the README, or a list/table with the bare essentials I can use to vary my implementation from the Pub/Sub sample.

  • Source Label (Cloud Audit Logs)
  • Import Path (@google/events/cloud/audit/v1/LogEntryData)
  • Converter Function (toAuditLogWrittenEvent)
  • Event Type (google.events.cloud.audit.v1)

Event Type is useful even though it's repeated from the other repository because with this information, I can implement my CloudEvent sink then pivot into specific research on how to create the trigger.

Actual Behavior

The Pub/Sub sample in the README provides clues and directs to googleapis/google-cloudevents. However, that repo doesn't provide sufficient Node.js-specific details, and so I return to this repo and click through the source code looking for more information.

grant commented

Yeah, a list in the README with some properties would be good:

Cloud Audit Logs

Type

google.cloud.audit.log.v1.written

Import

const {toAuditLogWrittenEvent} = require('@google/events/cloud/audit/v1/LogEntryData`);
// or
import {AuditLogWrittenEvent} from '@google/events/cloud/audit/v1/LogEntryData'

I tried a md table, but it's way too wide. Headers should look better although is more sparce.

grant commented

See above PR.