Documentation ¶
Index ¶
- type EventReminders
- func (r *EventReminders) AddReminderMessageToEvent(msg *ReminderMessage)
- func (r *EventReminders) ExistsEvent(eventID string) bool
- func (r *EventReminders) ForEachReminderMessageInEvent(eventID string, callback func(msg *ReminderMessage))
- func (r *EventReminders) RemoveEvent(eventID string)
- func (r *EventReminders) RemoveReminderMessageFromEvent(msg *ReminderMessage)
- type MinuteReminders
- func (r *MinuteReminders) AddReminderMessageToMinute(duration time.Duration, msg *ReminderMessage)
- func (r *MinuteReminders) ForEachReminderMessageInMinute(timestamp ReminderTimestamp, callback func(msg *ReminderMessage))
- func (r *MinuteReminders) RemoveMinute(timestamp ReminderTimestamp)
- func (r *MinuteReminders) RemoveReminderMessageFromAllMinutes(msg *ReminderMessage)
- func (r *MinuteReminders) RemoveReminderMessageFromMinute(msg *ReminderMessage, duration time.Duration)
- type ReminderMessage
- type ReminderScheduler
- func (r *ReminderScheduler) AddSubscription(account *gcalbot.Account, subscription gcalbot.Subscription)
- func (r *ReminderScheduler) RemoveSubscription(account *gcalbot.Account, subscription gcalbot.Subscription)
- func (r *ReminderScheduler) Run() (err error)
- func (r *ReminderScheduler) Shutdown() (err error)
- func (r *ReminderScheduler) UpdateOrCreateReminderEvent(account *gcalbot.Account, subscription *gcalbot.Subscription, ...) error
- type ReminderTimestamp
- type SubscriptionKey
- type SubscriptionReminders
- func (r *SubscriptionReminders) AddReminderMessageToSubscription(msg *ReminderMessage)
- func (r *SubscriptionReminders) ForEachReminderMessageInSubscription(keybaseUsername, accountNickname, calendarID string, ...)
- func (r *SubscriptionReminders) RemoveReminderMessageFromSubscription(msg *ReminderMessage)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventReminders ¶
Events
func NewEventReminders ¶
func NewEventReminders() *EventReminders
func (*EventReminders) AddReminderMessageToEvent ¶
func (r *EventReminders) AddReminderMessageToEvent(msg *ReminderMessage)
func (*EventReminders) ExistsEvent ¶
func (r *EventReminders) ExistsEvent(eventID string) bool
func (*EventReminders) ForEachReminderMessageInEvent ¶
func (r *EventReminders) ForEachReminderMessageInEvent( eventID string, callback func(msg *ReminderMessage), )
func (*EventReminders) RemoveEvent ¶
func (r *EventReminders) RemoveEvent(eventID string)
func (*EventReminders) RemoveReminderMessageFromEvent ¶
func (r *EventReminders) RemoveReminderMessageFromEvent(msg *ReminderMessage)
type MinuteReminders ¶
Minutes
func NewMinuteReminders ¶
func NewMinuteReminders() *MinuteReminders
func (*MinuteReminders) AddReminderMessageToMinute ¶
func (r *MinuteReminders) AddReminderMessageToMinute(duration time.Duration, msg *ReminderMessage)
func (*MinuteReminders) ForEachReminderMessageInMinute ¶
func (r *MinuteReminders) ForEachReminderMessageInMinute( timestamp ReminderTimestamp, callback func(msg *ReminderMessage), )
func (*MinuteReminders) RemoveMinute ¶
func (r *MinuteReminders) RemoveMinute(timestamp ReminderTimestamp)
func (*MinuteReminders) RemoveReminderMessageFromAllMinutes ¶
func (r *MinuteReminders) RemoveReminderMessageFromAllMinutes(msg *ReminderMessage)
func (*MinuteReminders) RemoveReminderMessageFromMinute ¶
func (r *MinuteReminders) RemoveReminderMessageFromMinute(msg *ReminderMessage, duration time.Duration)
type ReminderMessage ¶
type ReminderMessage struct { sync.Mutex EventID string EventSummary string KeybaseUsername string AccountNickname string CalendarID string KeybaseConvID chat1.ConvIDStr StartTime time.Time MsgContent string SubscriptionReminder *list.Element EventReminder *list.Element MinuteReminders map[time.Duration]*list.Element }
type ReminderScheduler ¶
type ReminderScheduler struct { *base.DebugOutput sync.Mutex // contains filtered or unexported fields }
func NewReminderScheduler ¶
func NewReminderScheduler( stats *base.StatsRegistry, debugConfig *base.ChatDebugOutputConfig, db *gcalbot.DB, oauth *oauth2.Config, ) *ReminderScheduler
func (*ReminderScheduler) AddSubscription ¶
func (r *ReminderScheduler) AddSubscription(account *gcalbot.Account, subscription gcalbot.Subscription)
func (*ReminderScheduler) RemoveSubscription ¶
func (r *ReminderScheduler) RemoveSubscription(account *gcalbot.Account, subscription gcalbot.Subscription)
func (*ReminderScheduler) Run ¶
func (r *ReminderScheduler) Run() (err error)
func (*ReminderScheduler) Shutdown ¶
func (r *ReminderScheduler) Shutdown() (err error)
func (*ReminderScheduler) UpdateOrCreateReminderEvent ¶
func (r *ReminderScheduler) UpdateOrCreateReminderEvent( account *gcalbot.Account, subscription *gcalbot.Subscription, event *calendar.Event, ) error
type ReminderTimestamp ¶
type ReminderTimestamp string
type SubscriptionReminders ¶
func NewSubscriptionReminders ¶
func NewSubscriptionReminders() *SubscriptionReminders
func (*SubscriptionReminders) AddReminderMessageToSubscription ¶
func (r *SubscriptionReminders) AddReminderMessageToSubscription(msg *ReminderMessage)
func (*SubscriptionReminders) ForEachReminderMessageInSubscription ¶
func (r *SubscriptionReminders) ForEachReminderMessageInSubscription( keybaseUsername, accountNickname, calendarID string, keybaseConvID chat1.ConvIDStr, callback func(msg *ReminderMessage, removeReminderMessageFromSubscription func()), )
func (*SubscriptionReminders) RemoveReminderMessageFromSubscription ¶
func (r *SubscriptionReminders) RemoveReminderMessageFromSubscription(msg *ReminderMessage)
Click to show internal directories.
Click to hide internal directories.