Documentation
¶
Index ¶
- func FindNextFriday(after time.Time) time.Time
- type NotificationConfig
- type NotificationService
- func (n *NotificationService) SendEmail(to, subject, body string) error
- func (n *NotificationService) SendFeedbackRequest(ctx context.Context, talkID int) error
- func (n *NotificationService) SendReminderToAttendees(ctx context.Context, talkID int) error
- func (n *NotificationService) SendReminderToSpeaker(ctx context.Context, talkID int) error
- func (n *NotificationService) SendTalkAnnouncementToAll(ctx context.Context, talkID int) error
- func (n *NotificationService) SendTalkConfirmationToSpeaker(ctx context.Context, talkID int) error
- func (n *NotificationService) SendWeeklyTalkDigest(ctx context.Context) error
- type SchedulerService
- func (s *SchedulerService) FindBestTalksForDate(ctx context.Context, date time.Time) ([]*TalkRanking, error)
- func (s *SchedulerService) GetUpcomingFridays(weeks int) []time.Time
- func (s *SchedulerService) IsDateScheduled(ctx context.Context, date time.Time) (bool, error)
- func (s *SchedulerService) ScheduleTalk(ctx context.Context, talkID int, date time.Time) error
- func (s *SchedulerService) SuggestNextFriday(ctx context.Context, weeksAhead int) (time.Time, []*TalkRanking, error)
- type TalkRanking
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NotificationConfig ¶
type NotificationConfig struct {
Enabled bool
SMTPHost string
SMTPPort int
SMTPUser string
SMTPPass string
SenderName string
SenderMail string
}
NotificationConfig holds configuration for email sending
type NotificationService ¶
type NotificationService struct {
// contains filtered or unexported fields
}
NotificationService handles sending notifications to users
func NewNotificationService ¶
func NewNotificationService( userRepo models.UserRepository, talkRepo models.TalkRepository, attendanceRepo models.AttendanceRepository, config NotificationConfig, ) *NotificationService
NewNotificationService creates a new NotificationService
func (*NotificationService) SendEmail ¶
func (n *NotificationService) SendEmail(to, subject, body string) error
SendEmail sends an email to a recipient
func (*NotificationService) SendFeedbackRequest ¶
func (n *NotificationService) SendFeedbackRequest(ctx context.Context, talkID int) error
SendFeedbackRequest sends a request for feedback after a talk is completed
func (*NotificationService) SendReminderToAttendees ¶
func (n *NotificationService) SendReminderToAttendees(ctx context.Context, talkID int) error
SendReminderToAttendees sends a reminder to confirmed attendees a day before a talk
func (*NotificationService) SendReminderToSpeaker ¶
func (n *NotificationService) SendReminderToSpeaker(ctx context.Context, talkID int) error
SendReminderToSpeaker sends a reminder to the speaker a day before their talk
func (*NotificationService) SendTalkAnnouncementToAll ¶
func (n *NotificationService) SendTalkAnnouncementToAll(ctx context.Context, talkID int) error
SendTalkAnnouncementToAll sends an announcement about a new scheduled talk to all users
func (*NotificationService) SendTalkConfirmationToSpeaker ¶
func (n *NotificationService) SendTalkConfirmationToSpeaker(ctx context.Context, talkID int) error
SendTalkConfirmationToSpeaker sends a confirmation email to a talk speaker
func (*NotificationService) SendWeeklyTalkDigest ¶
func (n *NotificationService) SendWeeklyTalkDigest(ctx context.Context) error
SendWeeklyTalkDigest sends a weekly digest of upcoming talks
type SchedulerService ¶
type SchedulerService struct {
// contains filtered or unexported fields
}
SchedulerService handles talk scheduling logic
func NewSchedulerService ¶
func NewSchedulerService( talkRepo models.TalkRepository, voteRepo models.VoteRepository, attendanceRepo models.AttendanceRepository, ) *SchedulerService
NewSchedulerService creates a new SchedulerService
func (*SchedulerService) FindBestTalksForDate ¶
func (s *SchedulerService) FindBestTalksForDate(ctx context.Context, date time.Time) ([]*TalkRanking, error)
FindBestTalksForDate finds the best candidate talks for a given date
func (*SchedulerService) GetUpcomingFridays ¶
func (s *SchedulerService) GetUpcomingFridays(weeks int) []time.Time
GetUpcomingFridays returns a list of upcoming Fridays
func (*SchedulerService) IsDateScheduled ¶
IsDateScheduled checks if a date already has a scheduled talk
func (*SchedulerService) ScheduleTalk ¶
ScheduleTalk schedules a talk for a specific date
func (*SchedulerService) SuggestNextFriday ¶
func (s *SchedulerService) SuggestNextFriday(ctx context.Context, weeksAhead int) (time.Time, []*TalkRanking, error)
SuggestNextFriday finds the best date and talk for the next Friday sessions