Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sendgrid support for single and bulk mail (#5) #8

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

bmonkman
Copy link
Contributor

@bmonkman bmonkman commented Dec 7, 2020

Also improved the schema a bit, added support for templated messages, and scheduled sending.

@bmonkman bmonkman requested review from davidcheung and a team December 7, 2020 23:34
@bmonkman bmonkman linked an issue Dec 7, 2020 that may be closed by this pull request
@@ -16,7 +16,7 @@ type Config struct {
var config *Config

const (
_ = string(iota) // We don't care about the values of these constants
_ = string(rune(iota)) // We don't care about the values of these constants
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious what does this do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a way to generate constants that have a specific, unique, but unimportant value. What we're using it for is to be able to refer to config options using a specific const like Port rather than just a string like "port" which allows us to be more precise about our type checking, avoid typos, etc.
I had to add rune in there because something changed in go 1.15 which caused a warning due to the conversion from int directly to string. It doesn't really matter in our situation because, again, the value itself is unimportant, as long as it's a unique string.

@bmonkman bmonkman merged commit 9786bdd into main Dec 10, 2020
@bmonkman bmonkman deleted the add-full-mail-support branch December 10, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flesh out sendgrid support in notification service
2 participants