Yimaru-BackEnd/internal/services/user/service.go

31 lines
457 B
Go

package user
import (
"time"
)
const (
OtpExpiry = 5 * time.Minute
)
type Service struct {
userStore UserStore
otpStore OtpStore
smsGateway SmsGateway
emailGateway EmailGateway
}
func NewService(
userStore UserStore,
otpStore OtpStore, smsGateway SmsGateway,
emailGateway EmailGateway,
) *Service {
return &Service{
userStore: userStore,
otpStore: otpStore,
smsGateway: smsGateway,
emailGateway: emailGateway,
}
}