Closed TheIronDev closed 2 years ago
Requesting a review from @inlined
@inlined Providing a default data
might fix that then? I'll follow up with you on that.
I suspect you'll have an easier time if you use a strategy pattern. For example, you can look up a Service (e.g. Pub/Sub or GCS) given an eventType and then call into that service's "generateMockEvent" method. This will help you, for example, only insert
params
on RTDB events or to insertappId
as a field in FireAlerts events.We're possibly going to have a lot of event types given that 3P events are coming. I think a little over-engineering to have a codebase where changes are decoupled from the rest of the codebase and have an obvious way to grow organically would be in our best interest.
I agree with the strategy pattern. We need a little more signal to differentiate some of the alerts, so I'm planning on also using eventTrigger?.eventFilters
as well.
Will ping you when I get closer to cleaning everything up.
Alright, Storage data
is done!
Still working on generating data for....
I think this is fine for a checkpoint. I may dig in later to play with the type system, DRY things out, and/or improve the way one field can be generated from another.
Sounds good to me! I'm going to submit to unblock the other team members.
Description
Implement
wrap
function for v2 CloudFuntions.Code sample