Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSlackClient ¶
func NewSlackClient(notifications *SlackNotifications) *slackClient
func NewSlackClientForHttpClient ¶ added in v0.10.19
func NewSlackClientForHttpClient(httpClient HttpClient, notifications *SlackNotifications) *slackClient
Types ¶
type DefaultHttpClient ¶ added in v0.10.19
type DefaultHttpClient struct{}
func (*DefaultHttpClient) PostJsonContent ¶ added in v0.10.19
func (*DefaultHttpClient) PostJsonContent(ctx context.Context, message, url string)
type HttpClient ¶ added in v0.10.19
type HttpClient interface {
PostJsonContent(ctx context.Context, message, url string)
}
type SlackClient ¶
type SlackClient interface {
// Use repo-specific channel, if exists
NotifyForRepo(ctx context.Context, repo, message string)
// Use default channel
Notify(ctx context.Context, message string)
}
type SlackNotifications ¶
type SlackNotifications struct {
DefaultUrl string `yaml:"default_url" json:"defaultUrl"`
RepoUrls map[string]string `yaml:"repo_urls" json:"repoUrls"`
}
Click to show internal directories.
Click to hide internal directories.