Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfirmData ¶
type ConfirmData struct { // Username to be addressed. Username string // URL of the instance to present to the receiver. InstanceURL string // Name of the instance to present to the receiver. InstanceName string // Link to present to the receiver to click on and do the confirmation. // Should be a full link with protocol eg., https://example.org/confirm_email?token=some-long-token ConfirmLink string }
ConfirmData represents data passed into the confirm email address template.
type ResetData ¶
type ResetData struct { // Username to be addressed. Username string // URL of the instance to present to the receiver. InstanceURL string // Name of the instance to present to the receiver. InstanceName string // Link to present to the receiver to click on and begin the reset process. // Should be a full link with protocol eg., https://example.org/reset_password?token=some-reset-password-token ResetLink string }
ResetData represents data passed into the reset email address template.
type Sender ¶
type Sender interface { // SendConfirmEmail sends a 'please confirm your email' style email to the given toAddress, with the given data. SendConfirmEmail(toAddress string, data ConfirmData) error // SendResetEmail sends a 'reset your password' style email to the given toAddress, with the given data. SendResetEmail(toAddress string, data ResetData) error }
Sender contains functions for sending emails to instance users/new signups.
func NewNoopSender ¶
NewNoopSender returns a no-op email sender that will just execute the given sendCallback every time it would otherwise send an email to the given toAddress with the given message value.
Passing a nil function is also acceptable, in which case the send functions will just return nil.
Click to show internal directories.
Click to hide internal directories.