notifiers

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package notifiers provides Slack notification formatting and delivery.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlackChannels added in v0.16.0

type SlackChannels struct {
	Default       string
	PRBypass      string
	OktaSync      string
	OrphanedUsers string
}

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 {
	PRBypassFooterNote string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL