Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEmailSendgrid ¶
func NewEmailSendgrid( sendGridApiKey, senderEmail, senderName string) *emailSendgrid
func NewEmailSmtp ¶
func NewEmailSmtp(senderEmail, smtpPassword, smtpHost, smtpPort string) *emailSmtp
Types ¶
type Email ¶
type Email interface {
// Init initializes the email service with the provided options.
Init(opts ...EmailOption) error
// SendMail sends an email to the specified recipients.
//
// Parameters:
// - to: List of email addresses to send the email to.
// - subject: Subject of the email.
// - message: Body of the email.
SendMail(to []string, subject, message string) error
// Options returns the current configuration options of the email service.
Options() EmailOptions
// String returns a string representation of the email service.
String() string
}
Email defines an interface for an email service.
It provides methods for initializing the service, sending general emails, and sending specific types of emails such as account password reset and invitations.
type EmailOption ¶
type EmailOption func(opt *EmailOptions) (*EmailOptions, error)
EmailOption defines a function type for setting options on the Email service.
It allows for configuring the Email service by applying various options.
type EmailOptions ¶
type EmailOptions struct {
}
EmailOptions represents configuration options for the Email service.
It is currently an empty struct, but can be extended in the future.
Click to show internal directories.
Click to hide internal directories.