Versions in this module Expand all Collapse all v0 v0.0.1 Feb 20, 2025 Changes in this version + var ErrMissingApiKey = errors.New("apiKey is missing") + var ErrMissingConfig = errors.New("config is missing") + var GetQueueURL = func(c context.Context, api SQSSendMessageAPI, input *sqs.GetQueueUrlInput) (*sqs.GetQueueUrlOutput, error) + var SendMsg = func(c context.Context, api SQSSendMessageAPI, input *sqs.SendMessageInput) (*sqs.SendMessageOutput, error) + func NewConsoleService(stdout io.Writer) *consoleService + func NewEmailService(opts EmailOptions) *emailService + type AlertmanagerNotification struct + Annotations map[string]string + GeneratorURL string + Labels map[string]string + StartsAt time.Time + func (n AlertmanagerNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type AlertmanagerOptions struct + APIPath string + BasicAuth *BasicAuth + BearerToken string + InsecureSkipVerify bool + Scheme string + Targets []string + Timeout int + type AwsAccess struct + Key string + Secret string + type AwsSqsNotification struct + MessageAttributes map[string]string + MessageGroupId string + func (n *AwsSqsNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type AwsSqsOptions struct + Account string + EndpointUrl string + Queue string + Region string + type BasicAuth struct + Password string + Username string + type Destination struct + Recipient string + Service string + type Destinations map[string][]Destination + func (s Destinations) Dedup() Destinations + func (s Destinations) Merge(other Destinations) + type EmailNotification struct + Body string + Subject string + func (n *EmailNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type EmailOptions struct + From string + Host string + Html bool + InsecureSkipVerify bool + Password string + Port int + Username string + type GitHubCheckRun struct + CompletedAt string + Conclusion string + DetailsURL string + Name string + Output *GitHubCheckRunOutput + StartedAt string + Status string + type GitHubCheckRunOutput struct + Summary string + Text string + Title string + type GitHubDeployment struct + AutoMerge *bool + Environment string + EnvironmentURL string + LogURL string + Reference string + RequiredContexts []string + State string + TransientEnvironment *bool + type GitHubNotification struct + CheckRun *GitHubCheckRun + Deployment *GitHubDeployment + PullRequestComment *GitHubPullRequestComment + RepoURLPath string + RevisionPath string + Status *GitHubStatus + func (g *GitHubNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type GitHubOptions struct + AppID interface{} + EnterpriseBaseURL string + InstallationID interface{} + PrivateKey string + type GitHubPullRequestComment struct + Content string + type GitHubStatus struct + Label string + State string + TargetURL string + type GoogleChatNotification struct + Cards string + CardsV2 string + ThreadKey string + func (n *GoogleChatNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type GoogleChatOptions struct + WebhookUrls map[string]string + type GrafanaAnnotation struct + IsRegion bool + Tags []string + Text string + Time int64 + type GrafanaOptions struct + ApiKey string + ApiUrl string + InsecureSkipVerify bool + type Header struct + Name string + Value string + type MattermostNotification struct + Attachments string + func (n *MattermostNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type MattermostOptions struct + ApiURL string + InsecureSkipVerify bool + Token string + type NewrelicNotification struct + Changelog string + Description string + Revision string + User string + func (n *NewrelicNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type NewrelicOptions struct + ApiKey string + ApiURL string + type Notification struct + Alertmanager *AlertmanagerNotification + AwsSqs *AwsSqsNotification + Email *EmailNotification + GitHub *GitHubNotification + GoogleChat *GoogleChatNotification + Mattermost *MattermostNotification + Message string + Newrelic *NewrelicNotification + Opsgenie *OpsgenieNotification + Pagerduty *PagerDutyNotification + PagerdutyV2 *PagerDutyV2Notification + RocketChat *RocketChatNotification + Slack *SlackNotification + Teams *TeamsNotification + Webhook WebhookNotifications + func (n *Notification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + func (n *Notification) Preview() string + type NotificationService interface + Send func(notification Notification, dest Destination) error + func NewAlertmanagerService(opts AlertmanagerOptions) NotificationService + func NewAwsSqsService(opts AwsSqsOptions) NotificationService + func NewGitHubService(opts GitHubOptions) (NotificationService, error) + func NewGoogleChatService(opts GoogleChatOptions) NotificationService + func NewGrafanaService(opts GrafanaOptions) NotificationService + func NewMattermostService(opts MattermostOptions) NotificationService + func NewNewrelicService(opts NewrelicOptions) NotificationService + func NewOpsgenieService(opts OpsgenieOptions) NotificationService + func NewPagerdutyService(opts PagerdutyOptions) NotificationService + func NewPagerdutyV2Service(opts PagerdutyV2Options) NotificationService + func NewPushoverService(opts PushoverOptions) NotificationService + func NewRocketChatService(opts RocketChatOptions) NotificationService + func NewService(serviceType string, optsData []byte) (NotificationService, error) + func NewSlackService(opts SlackOptions) NotificationService + func NewTeamsService(opts TeamsOptions) NotificationService + func NewTelegramService(opts TelegramOptions) NotificationService + func NewWebexService(opts WebexOptions) NotificationService + func NewWebhookService(opts WebhookOptions) NotificationService + type OpsgenieNotification struct + Actions []string + Alias string + Description string + Details map[string]string + Entity string + Note string + Priority string + Tags []string + User string + VisibleTo []alert.Responder + func (n *OpsgenieNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type OpsgenieOptions struct + ApiKeys map[string]string + ApiUrl string + type PagerDutyNotification struct + Body string + PriorityId string + Title string + Urgency string + func (p *PagerDutyNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type PagerDutyV2Notification struct + Class string + Component string + Group string + Severity string + Source string + Summary string + URL string + func (p *PagerDutyV2Notification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type PagerdutyOptions struct + From string + ServiceID string + Token string + type PagerdutyV2Options struct + ServiceKeys map[string]string + type PushoverOptions struct + Token string + type RocketChatNotification struct + Attachments string + func (n *RocketChatNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type RocketChatOptions struct + Alias string + Avatar string + Email string + Icon string + Password string + ServerUrl string + type SQSSendMessageAPI interface + GetQueueUrl func(ctx context.Context, params *sqs.GetQueueUrlInput, ...) (*sqs.GetQueueUrlOutput, error) + SendMessage func(ctx context.Context, params *sqs.SendMessageInput, ...) (*sqs.SendMessageOutput, error) + type SlackNotification struct + Attachments string + Blocks string + DeliveryPolicy slackutil.DeliveryPolicy + GroupingKey string + Icon string + NotifyBroadcast bool + Username string + func (n *SlackNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type SlackOptions struct + ApiURL string + Channels []string + DisableUnfurl bool + Icon string + InsecureSkipVerify bool + SigningSecret string + Token string + Username string + type TeamsNotification struct + Facts string + PotentialAction string + Sections string + Summary string + Template string + Text string + ThemeColor string + Title string + func (n *TeamsNotification) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type TeamsOptions struct + RecipientUrls map[string]string + type TelegramOptions struct + Token string + type Templater func(notification *Notification, vars map[string]interface{}) error + type TemplaterSource interface + GetTemplater func(name string, f texttemplate.FuncMap) (Templater, error) + type WebexOptions struct + ApiURL string + Token string + type WebhookNotification struct + Body string + Method string + Path string + type WebhookNotifications map[string]WebhookNotification + func (n WebhookNotifications) GetTemplater(name string, f texttemplate.FuncMap) (Templater, error) + type WebhookOptions struct + BasicAuth *BasicAuth + Headers []Header + InsecureSkipVerify bool + RetryMax int + RetryWaitMax time.Duration + RetryWaitMin time.Duration + URL string