Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogSender ¶
LogSender log emails.
func NewLogSender ¶
NewLogSender implementation using the provided logger.
type SMTPSender ¶
SMTPSender sends emails using an SMTP nakama.
func NewSMTPSender ¶
func NewSMTPSender(from, host string, port int, username, password string) *SMTPSender
NewSMTPSender implementation using an SMTP server.
func (*SMTPSender) Send ¶
func (s *SMTPSender) Send(to, subject, html, text string) error
Send an email to the given email address.
type SenderMock ¶
type SenderMock struct { // SendFunc mocks the Send method. SendFunc func(to string, subject string, html string, text string) error // contains filtered or unexported fields }
SenderMock is a mock implementation of Sender.
func TestSomethingThatUsesSender(t *testing.T) { // make and configure a mocked Sender mockedSender := &SenderMock{ SendFunc: func(to string, subject string, html string, text string) error { panic("mock out the Send method") }, } // use mockedSender in code that requires Sender // and then make assertions. }
type SendgridSender ¶
func NewSendgridSender ¶
func NewSendgridSender(from, apiKey string) *SendgridSender
func (*SendgridSender) Send ¶
func (s *SendgridSender) Send(to, subject, html, text string) error
Click to show internal directories.
Click to hide internal directories.