Documentation
¶
Index ¶
- type EmailBuild
- func (b *EmailBuild) NotifyAccountDeleted(sysName, support string) string
- func (b *EmailBuild) NotifyOldEmail(sysName, support string) string
- func (b *EmailBuild) VerificationChangeEmail(callback, code string) string
- func (b *EmailBuild) VerificationDeleteAccount(sysName, support, callback, code string) string
- func (b *EmailBuild) VerificationEmail(callback, code string) string
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) NotifyAccountDeleted ¶ added in v1.4.1
func (b *EmailBuild) NotifyAccountDeleted(sysName, support string) string
NotifyAccountDeleted returns an HTML email body notifying the user that their account has been deleted. 'sysName' is the system name, 'support' is the support email for reporting unauthorized deletion.
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) VerificationDeleteAccount ¶ added in v1.4.0
func (b *EmailBuild) VerificationDeleteAccount(sysName, support, callback, code string) string
VerificationDeleteAccount returns an HTML email body for verifying a user's account deletion request. 'sysName' is the system name, 'support' is the support email, 'callback' is the endpoint path, and 'code' is the unique verification code.
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.