notification

package
v0.0.0-...-736cfa7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OTPSender

type OTPSender interface {
	SendOTP(to, otp string) error
}

OTPSender defines the interface for sending OTPs

type Service

type Service struct {
	EmailService *email.Service
	SMSService   *sms.Service
}

Service is a combined notification service that can send both emails and SMS

func NewService

func NewService(emailConfig email.Config, smsConfig sms.Config) *Service

NewService creates a new notification service

func (*Service) SendEmailOTP

func (s *Service) SendEmailOTP(email, otp string) error

SendEmailOTP sends an OTP via email

func (*Service) SendSMSOTP

func (s *Service) SendSMSOTP(phone, otp string) error

SendSMSOTP sends an OTP via SMS

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL