Skip to content

Instantly share code, notes, and snippets.

@Harsimran1
Created February 21, 2021 12:31
Show Gist options
  • Save Harsimran1/ad2e1cdcc74a388c579309d3f36a4d45 to your computer and use it in GitHub Desktop.
Save Harsimran1/ad2e1cdcc74a388c579309d3f36a4d45 to your computer and use it in GitHub Desktop.
Sendgrid with interface
package sendgrid
type SendGrid interface {
SendValidationEmail(email string) error
SendPasswordChangeEmail(email string) error
}
// sendgrid is our Sendgrid implementation.
type sendgrid struct {
/* impl */
}
func NewSendGrid(host string) SendGrid {
return &sendgrid{host}
}
func (s *sendgrid) SendValidationEmail(email string) error {
/* impl */
}
func (s *sendgrid) SendPasswordChangeEmail(email string) error {
/* impl */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment