Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RemindersChannel = make(chan *EventToBeSent)
RemindersChannel
Functions ¶
func CompareReminders ¶
func CompareReminders(reminder *Reminder)
func GetClosestReminder ¶
func GetClosestReminder()
GetClosestReminder fetches the closest reminder from the database
func GetDateIndices ¶
GetDateIndices finds the start and end indices of the date and time from a given input message
func SendReminder ¶
func SendReminder(event *Reminder)
Types ¶
type EventToBeSent ¶
type EventToBeSent struct { Reminder *Reminder MessageConfig *tgbotapi.MessageConfig }
type Reminder ¶
type Reminder struct { ID primitive.ObjectID `bson:"_id,omitempty"` Date time.Time `bson:"date,omitempty"` Title string `bson:"title,omitempty"` ChatId int64 `bson:"chatID,omitempty"` }
Reminder is memory representation of a reminder object
var ClosestEvent Reminder
ClosestEvent represents a reminder which is closest to the current time
Click to show internal directories.
Click to hide internal directories.