Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type ConfigurationProvider
- type QuestionSet
- type QuestionSetConfig
- type Report
- type ScrumReminderJob
- func (m ScrumReminderJob) AddToOutOfOffice(team string, username string)
- func (m ScrumReminderJob) DeleteLastReport(user string) bool
- func (m ScrumReminderJob) GetQuestionSetsForTeam(team string) []*QuestionSet
- func (m ScrumReminderJob) GetTeamsForUser(username string) []string
- func (m ScrumReminderJob) RemoveFromOutOfOffice(team string, username string)
- func (job *ScrumReminderJob) Run()
- func (m ScrumReminderJob) SaveReport(report *Report, qs *QuestionSet)
- type ScrumReportJob
- func (m ScrumReportJob) AddToOutOfOffice(team string, username string)
- func (m ScrumReportJob) DeleteLastReport(user string) bool
- func (m ScrumReportJob) GetQuestionSetsForTeam(team string) []*QuestionSet
- func (m ScrumReportJob) GetTeamsForUser(username string) []string
- func (m ScrumReportJob) RemoveFromOutOfOffice(team string, username string)
- func (job *ScrumReportJob) Run()
- func (m ScrumReportJob) SaveReport(report *Report, qs *QuestionSet)
- type Service
- type Team
- type TeamConfig
- type TeamState
- func (m TeamState) AddToOutOfOffice(team string, username string)
- func (m TeamState) DeleteLastReport(user string) bool
- func (m TeamState) GetQuestionSetsForTeam(team string) []*QuestionSet
- func (m TeamState) GetTeamsForUser(username string) []string
- func (m TeamState) RemoveFromOutOfOffice(team string, username string)
- func (m TeamState) SaveReport(report *Report, qs *QuestionSet)
Constants ¶
View Source
const ( First iteration = iota Last )
Variables ¶
View Source
var (
SlackParams = slack.PostMessageParameters{AsUser: true}
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Timezone string `json:"timezone"` Teams []TeamConfig `json:"teams"` }
Config is the configuration format
type ConfigurationProvider ¶
func NewConfigWatcher ¶
func NewConfigWatcher(file string) ConfigurationProvider
type QuestionSet ¶
type QuestionSetConfig ¶
type ScrumReminderJob ¶
type ScrumReminderJob struct { *TeamState *QuestionSet // contains filtered or unexported fields }
func (ScrumReminderJob) AddToOutOfOffice ¶
func (ScrumReminderJob) DeleteLastReport ¶
func (ScrumReminderJob) GetQuestionSetsForTeam ¶
func (m ScrumReminderJob) GetQuestionSetsForTeam(team string) []*QuestionSet
func (ScrumReminderJob) GetTeamsForUser ¶
func (ScrumReminderJob) RemoveFromOutOfOffice ¶
func (*ScrumReminderJob) Run ¶
func (job *ScrumReminderJob) Run()
func (ScrumReminderJob) SaveReport ¶
func (m ScrumReminderJob) SaveReport(report *Report, qs *QuestionSet)
type ScrumReportJob ¶
type ScrumReportJob struct { *TeamState *QuestionSet }
func (ScrumReportJob) AddToOutOfOffice ¶
func (ScrumReportJob) DeleteLastReport ¶
func (ScrumReportJob) GetQuestionSetsForTeam ¶
func (m ScrumReportJob) GetQuestionSetsForTeam(team string) []*QuestionSet
func (ScrumReportJob) GetTeamsForUser ¶
func (ScrumReportJob) RemoveFromOutOfOffice ¶
func (*ScrumReportJob) Run ¶
func (job *ScrumReportJob) Run()
func (ScrumReportJob) SaveReport ¶
func (m ScrumReportJob) SaveReport(report *Report, qs *QuestionSet)
type Service ¶
type Service interface { DeleteLastReport(username string) bool GetTeamsForUser(username string) []string GetQuestionSetsForTeam(team string) []*QuestionSet SaveReport(report *Report, qs *QuestionSet) AddToOutOfOffice(team string, username string) RemoveFromOutOfOffice(team string, username string) }
func NewService ¶
func NewService(configurationProvider ConfigurationProvider, slackBotAPI *slack.Client) Service
type TeamConfig ¶
type TeamConfig struct { Name string `json:"name"` Channel string `json:"channel"` Members []string `json:"members"` QuestionSets []QuestionSetConfig `json:"question_sets"` Timezone string `json:"timezone"` }
TeamConfig is the file format for the configuration of a team in json
{ "channel": "analyticsinternal", "name": "Usage Analytics", "members": ["@jrochette", "@pastjean", "@lbourdages", "@gbergeron", "@mlachapelle", "@aemond", "@gprovost"], "question_sets": [{ "questions": [ "What did you do yesterday? _(jira if needed)_", "What will you do today?", "Are you being blocked by someone for a review? who ? why ?" ], "report_schedule_cron": "0 0 8 * * MON", "first_reminder_limit": "+55m", "last_reminder_limit": "+65m" }
func (*TeamConfig) ToTeam ¶
func (tc *TeamConfig) ToTeam() *Team
type TeamState ¶
func (TeamState) AddToOutOfOffice ¶
func (TeamState) DeleteLastReport ¶
func (TeamState) GetQuestionSetsForTeam ¶
func (m TeamState) GetQuestionSetsForTeam(team string) []*QuestionSet
func (TeamState) GetTeamsForUser ¶
func (TeamState) RemoveFromOutOfOffice ¶
func (TeamState) SaveReport ¶
func (m TeamState) SaveReport(report *Report, qs *QuestionSet)
Click to show internal directories.
Click to hide internal directories.