Open dannykopping opened 3 months ago
Right now, the delivery methods are smtp
and webhook
, but they are typed as regular string
values in the codersdk. I think it would be great to have the method value as enum types in the SDK to ensure more reliable type checking in the BE and FE. I see they are enums in the database layer, though.
Ideally this code generation would produced a file called
coderd/notifications/system_templates_generated.go
:NOTE: this must ONLY consider templates of
kind=system
.We need this code-generation to solve a few problems:
notification_templates
table won't need to use a real pg db anymore, speeding up testsAllSystemTemplates()
will allow us to determine if we're missing any test casesOver and above this, we'll need a linter to validate that this new file is not out-of-sync with the database after migrations have run.