Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailBuild ¶
type EmailBuild struct {
// contains filtered or unexported fields
}
EmailBuild constructs HTML email bodies for verification and notification emails. It holds the base domain used for building verification links.
func NewEmailBuild ¶
func NewEmailBuild(domain string) *EmailBuild
NewEmailBuild creates a new EmailBuild with the given domain as the base URL. The domain should include scheme (e.g., https://example.com) and optionally a trailing slash.
func (*EmailBuild) NotifyOldEmail ¶
func (b *EmailBuild) NotifyOldEmail(sysName, support string) string
NotifyOldEmail returns an HTML email body notifying the user at their old email address that their account email was changed. 'sysName' is the name of the system or application. 'support' is the support email address to contact if the change was unauthorized.
func (*EmailBuild) VerificationChangeEmail ¶
func (b *EmailBuild) VerificationChangeEmail(callback, code string) string
VerificationChangeEmail returns an HTML email body for verifying a user's new email address after an email change. 'callback' is the verification endpoint path appended to the domain. 'code' is the unique verification code appended as a query parameter.
func (*EmailBuild) VerificationEmail ¶
func (b *EmailBuild) VerificationEmail(callback, code string) string
VerificationEmail returns an HTML email body for verifying a user's email address after registration. 'callback' is the verification endpoint path appended to the domain. 'code' is the unique verification code appended as a query parameter.