reminders

package
v0.0.0-...-846776f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddReminder

func AddReminder(r Reminder) error

AddReminder adds a reminder to the scheduler.

func Init

func Init()

Init initializes the reminder scheduler.

func Start

func Start()

Start starts the reminder scheduler.

Types

type Config

type Config struct {
	Team            int            `db:"team"`
	Activities      pq.StringArray `db:"activities"`
	AnnounceChannel string         `db:"announce_channel"`
	RoleMention     sql.NullString `db:"role_mention"`
	Intervals       pq.Int64Array  `db:"intervals"`
}

Config holds a team's reminder configuration.

type Reminder

type Reminder struct {
	State  *state.State
	Team   *team.Team
	Config *Config
	// contains filtered or unexported fields
}

Reminder will check if there's an activity coming up that needs pinging

func (Reminder) Run

func (r Reminder) Run()

Run checks if there's an activity coming up, and sends an announcement if it's the first one of the day

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL