Documentation
¶
Index ¶
- Constants
- Variables
- func DayAndMonthMatch(t time.Time) bool
- func Execute()
- func GetTodaysEventsForPerson(p config.Person, c *config.Config) <-chan Event
- func SendReminders(c *config.Config, sc slack.SlackCommunicator)
- func SlackAnniversaryChannelHandler(e PersonalEvent, c *config.Config, s slack.ChannelMessenger)
- func SlackBirthdayPersonalReminderHandler(e PersonalEvent, c *config.Config, s slack.PersonalReminderSetter)
- func SlackBirthdayReminderChannelHandler(e PersonalEvent, c *config.Config, s slack.ChannelMessenger)
- func SlackBirthdayReminderDirectMessageHandler(e PersonalEvent, c *config.Config, s slack.DirectMessenger)
- func SlackMonthlyReportHandler(e MonthlyReportEvent, c *config.Config, s slack.ChannelMessenger)
- type Event
- type EventType
- type MonthlyReportEvent
- type PersonalEvent
- type SlackUser
Constants ¶
View Source
const Version = "0.5.0"
Variables ¶
View Source
var ( DownloadUsers = &cobra.Command{ Use: "download-users", Short: fmt.Sprintf("Download users from Slack"), Long: fmt.Sprintf("Get users from Slack and save as `%s` (filters out users marked as bots and deleted users).", filename), Run: func(cmd *cobra.Command, args []string) { downloadUserFromSlack() }, } )
View Source
var GetNow = time.Now
View Source
var SendRemindersCmd = &cobra.Command{ Use: "send-reminders", Short: "Send remidners via configured handlers", Long: "Send remidners via configured handlers", Run: func(cmd *cobra.Command, args []string) { cfg := config.GetConfig() SendReminders( cfg, slack.NewClient(cfg.Slack.BotToken, cfg.Slack.UserToken), ) }, }
Functions ¶
func DayAndMonthMatch ¶
func SendReminders ¶
func SendReminders(c *config.Config, sc slack.SlackCommunicator)
func SlackAnniversaryChannelHandler ¶
func SlackAnniversaryChannelHandler(e PersonalEvent, c *config.Config, s slack.ChannelMessenger)
func SlackBirthdayPersonalReminderHandler ¶
func SlackBirthdayPersonalReminderHandler(e PersonalEvent, c *config.Config, s slack.PersonalReminderSetter)
func SlackBirthdayReminderChannelHandler ¶
func SlackBirthdayReminderChannelHandler(e PersonalEvent, c *config.Config, s slack.ChannelMessenger)
func SlackBirthdayReminderDirectMessageHandler ¶
func SlackBirthdayReminderDirectMessageHandler(e PersonalEvent, c *config.Config, s slack.DirectMessenger)
func SlackMonthlyReportHandler ¶
func SlackMonthlyReportHandler(e MonthlyReportEvent, c *config.Config, s slack.ChannelMessenger)
Types ¶
type MonthlyReportEvent ¶
type MonthlyReportEvent struct { Type EventType Birthdays []config.Person Anniversaries []config.Person }
func GetMonthlyReportEvent ¶
func GetMonthlyReportEvent(p []config.Person) MonthlyReportEvent
func (MonthlyReportEvent) GetType ¶
func (e MonthlyReportEvent) GetType() EventType
type PersonalEvent ¶
func (PersonalEvent) GetType ¶
func (e PersonalEvent) GetType() EventType
Click to show internal directories.
Click to hide internal directories.