Documentation
¶
Index ¶
- func NotifyOn(filter NotifyFilter) notifyOptsFunc
- func WithNotify(notify NotifyType) notifyOptsFunc
- func WithRepo(repo Repo) repoOptFunc
- func WithRepoBranch(branch string) repoOptFunc
- func WithRepoName(name string) repoOptFunc
- func WithSlackConfig(config *SlackConfig) notifyOptsFunc
- type Data
- type NotifyFilter
- type NotifyType
- type Repo
- type Service
- type SlackConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotifyOn ¶
func NotifyOn(filter NotifyFilter) notifyOptsFunc
func WithNotify ¶
func WithNotify(notify NotifyType) notifyOptsFunc
func WithRepoBranch ¶
func WithRepoBranch(branch string) repoOptFunc
func WithRepoName ¶
func WithRepoName(name string) repoOptFunc
func WithSlackConfig ¶
func WithSlackConfig(config *SlackConfig) notifyOptsFunc
Types ¶
type Data ¶
func (Data) StatusColor ¶
type NotifyFilter ¶
type NotifyFilter string
const ( NotifyFilterAll NotifyFilter = "all" NotifyFilterDrift NotifyFilter = "drift" )
func (NotifyFilter) IsValid ¶
func (f NotifyFilter) IsValid() bool
IsValid checks that the given string for a notification is valid
func (NotifyFilter) ShouldNotify ¶
func (f NotifyFilter) ShouldNotify(runner *runner.Runner) bool
ShouldNotify takes a runner and returns a bool whether the notification should be sent, or not
type Repo ¶
func LookupRepo ¶
LookupRepo gets the repository data for the drift detection. It reads from environment variables (if set) otherwise fetches the information from the local git repository
type SlackConfig ¶
type SlackConfig struct { // Channel is the slack channel where to send the notification Channel string // Template is an optional string that will be templated into JSON for // Slack's message options. // A default template will be used if empty TemplateFile string // SkipAuthTest defines whether to skip the Slack auth test when creating // the service or not SkipAuthTest bool }
func DefaultSlackConfig ¶
func DefaultSlackConfig() *SlackConfig
Click to show internal directories.
Click to hide internal directories.