Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailAdapter ¶
Adapter defines the interface for sending emails via different providers.
type EmailService ¶
type EmailService interface { SendEmail(ctx context.Context, email dto.Email) error SendPasswordReset(ctx context.Context, to string, link string) error SendVerificationCode(ctx context.Context, to string, code string) error SendWelcome(ctx context.Context, to string, name string) error SendWarningLogin(ctx context.Context, to string, location string, time string) error ServiceName() string }
Service defines the core logic for handling emails.
func NewEmailService ¶
NewEmailService creates a new instance of Service.
type NotifyAdapter ¶
NotifyAdapter defines the interface for sending notifications via different providers/channels.
type NotifyService ¶
type NotifyService interface { Send(ctx context.Context, content dto.Content) error Alert(ctx context.Context, subject, message string) error Info(ctx context.Context, subject, message string) error Notify(ctx context.Context, subject, message string, level dto.Level) error ServiceName() string }
NotifyService defines the core logic for handling notifications.
func NewNotifyService ¶
NewNotifyService creates a new instance of Service.
type SMSAdapter ¶
SMSAdapter defines the interface for sending SMS messages via different providers.
type SMSService ¶
type SMSService interface { Send(ctx context.Context, sms dto.SMS) error SendCode(ctx context.Context, to string, code string) error ServiceName() string }
SMSService defines the core logic for handling SMS messages.
func NewSMSService ¶
NewSMSService creates a new instance of Service. It requires an Adapter to be provided.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.