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) GetTeamByName(teamName string) (*TeamState, error)
- 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) GetTeamByName(teamName string) (*TeamState, error)
- 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) GetTeamByName(teamName string) (*TeamState, error)
- 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, LinkNames: 1}
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 ¶
{
"timezone": "America/Montreal",
"teams": [
{
"channel": "general",
"name": "L337",
"members": [
"fboutin2",
"lbourdages",
"pa",
"jo"
],
"split_report": false,
"question_sets": [
{
"questions": [
"What did you do yesterday?",
"What will you do today?",
"Are you being blocked by someone for a review? who ? why ?",
"How will you dominate the world"
],
"report_schedule_cron": "@every 30s",
"first_reminder_limit": "-8s",
"last_reminder_limit": "-3s"
}
]
}
]
}
func NewConfigWatcher ¶
func NewConfigWatcher(file string) ConfigurationProvider
type QuestionSet ¶
type QuestionSetConfig ¶
type QuestionSetConfig struct {
Questions []string `json:"questions"`
ReportScheduleCron string `json:"report_schedule_cron"`
FirstReminderBeforeReport string `json:"first_reminder_limit"`
LastReminderBeforeReport string `json:"last_reminder_limit"`
}
{
"timezone": "America/Montreal",
"teams": [
{
"channel": "general",
"name": "L337",
"members": [
"fboutin2",
"lbourdages",
"pa",
"jo"
],
"split_report": false,
"question_sets": [
{
"questions": [
"What did you do yesterday?",
"What will you do today?",
"Are you being blocked by someone for a review? who ? why ?",
"How will you dominate the world"
],
"report_schedule_cron": "@every 30s",
"first_reminder_limit": "-8s",
"last_reminder_limit": "-3s"
}
]
}
]
}
type Report ¶
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) GetTeamByName ¶ added in v0.15.1
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) GetQuestionSetsForTeam ¶
func (m ScrumReportJob) GetQuestionSetsForTeam(team string) []*QuestionSet
func (ScrumReportJob) GetTeamByName ¶ added in v0.15.1
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
GetTeamByName(teamName string) (*TeamState, error)
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 Team ¶
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"`
SplitReport bool `json:"split_report"`
}
{
"timezone": "America/Montreal",
"teams": [
{
"channel": "general",
"name": "L337",
"members": [
"fboutin2",
"lbourdages",
"pa",
"jo"
],
"split_report": false,
"question_sets": [
{
"questions": [
"What did you do yesterday?",
"What will you do today?",
"Are you being blocked by someone for a review? who ? why ?",
"How will you dominate the world"
],
"report_schedule_cron": "@every 30s",
"first_reminder_limit": "-8s",
"last_reminder_limit": "-3s"
}
]
}
]
}
func (*TeamConfig) ToTeam ¶
func (tc *TeamConfig) ToTeam() *Team
type TeamState ¶
func (TeamState) AddToOutOfOffice ¶
func (TeamState) GetQuestionSetsForTeam ¶
func (m TeamState) GetQuestionSetsForTeam(team string) []*QuestionSet
func (TeamState) GetTeamByName ¶ added in v0.15.1
func (TeamState) RemoveFromOutOfOffice ¶
func (TeamState) SaveReport ¶
func (m TeamState) SaveReport(report *Report, qs *QuestionSet)
Source Files
¶
- config.go
- service.go
- state.go
Click to show internal directories.
Click to hide internal directories.