Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIKeys ¶
GetAPIKeys retrieves the API key from environment variables
func IsExternalTrigger ¶
func IsExternalTrigger() bool
IsExternalTrigger retrieves if the Slackduty is triggered from external trigger or not. If it is configured to `true`, the Slackduty process will exits once it updates the Slack usergroup. It will ignore the `group[].schedule`.
If `false`, Slackduty will run kind of like a daemon and runs by schedule specified.
Types ¶
type Config ¶
type Config struct {
Groups []Group `yaml:"groups"`
}
Config is the CLI configuration kept in SLACKDUTY_CONFIG(default value is )
type Group ¶
type Group struct { Name string `yaml:"name"` Exclude []string `yaml:"exclude"` Members *Members `yaml:"members"` Schedule string `yaml:"schedule"` Usergroups []string `yaml:"usergroups"` }
Group represents one single rule for syncronizing. A group will syncronize with the same fetch schedule.
type Members ¶
Members represents the Slack or Pagerduty user which belongs to the handle(s) defined in the same group.