Documentation
¶
Overview ¶
Package notifiers provides Slack notification formatting and delivery.
Index ¶
- type SlackChannels
- type SlackMessages
- type SlackNotifier
- func (s *SlackNotifier) NotifyOktaSync(ctx context.Context, reports []*okta.SyncReport, githubOrg string) error
- func (s *SlackNotifier) NotifyOrphanedUsers(ctx context.Context, report *okta.OrphanedUsersReport) error
- func (s *SlackNotifier) NotifyPRBypass(ctx context.Context, result *client.PRComplianceResult, repoFullName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackChannels ¶ added in v0.16.0
SlackChannels holds channel IDs for different notification types. empty values fall back to the default channel.
type SlackMessages ¶ added in v0.19.0
type SlackMessages struct {
}
SlackMessages holds optional custom messages for different notification types. empty values are excluded from the notification.
type SlackNotifier ¶
type SlackNotifier struct {
// contains filtered or unexported fields
}
SlackNotifier sends formatted messages to Slack channels.
func NewSlackNotifier ¶
func NewSlackNotifier(token string, channels SlackChannels, messages SlackMessages) *SlackNotifier
NewSlackNotifier creates a Slack notifier with default API URL.
func NewSlackNotifierWithAPIURL ¶
func NewSlackNotifierWithAPIURL(token string, channels SlackChannels, messages SlackMessages, apiURL string) *SlackNotifier
NewSlackNotifierWithAPIURL creates a Slack notifier with custom API URL. useful for testing with mock servers.
func (*SlackNotifier) NotifyOktaSync ¶
func (s *SlackNotifier) NotifyOktaSync(ctx context.Context, reports []*okta.SyncReport, githubOrg string) error
NotifyOktaSync sends a Slack notification with Okta sync results.
func (*SlackNotifier) NotifyOrphanedUsers ¶
func (s *SlackNotifier) NotifyOrphanedUsers(ctx context.Context, report *okta.OrphanedUsersReport) error
NotifyOrphanedUsers sends a Slack notification about organization members not in any synced teams.
func (*SlackNotifier) NotifyPRBypass ¶
func (s *SlackNotifier) NotifyPRBypass(ctx context.Context, result *client.PRComplianceResult, repoFullName string) error
NotifyPRBypass sends a Slack notification when branch protection is bypassed.