notification

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

notification.go

service.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationService

type NotificationService interface {
	CompareContainersAndNotify(initialContainers, currentContainers []types.Container) error
}

NotificationService defines the methods for handling notifications.

func NewNotificationService

func NewNotificationService(containerService container.ContainerService, webhookService WebhookService) NotificationService

type NotificationServiceImpl

type NotificationServiceImpl struct {
	// contains filtered or unexported fields
}

func (*NotificationServiceImpl) CompareContainersAndNotify

func (ns *NotificationServiceImpl) CompareContainersAndNotify(initialContainers, currentContainers []types.Container) error

type WebhookClient

type WebhookClient struct {
	// contains filtered or unexported fields
}

func NewWebhookClient

func NewWebhookClient(googleChatURL, discordURL string) *WebhookClient

func (*WebhookClient) GetDiscordWebhookURL

func (wc *WebhookClient) GetDiscordWebhookURL() string

func (*WebhookClient) GetGoogleChatWebhookURL

func (wc *WebhookClient) GetGoogleChatWebhookURL() string

func (*WebhookClient) SendWebhook

func (wc *WebhookClient) SendWebhook(webhookURL, payload string) error

type WebhookService

type WebhookService interface {
	SendWebhook(webhookURL, message string) error
	GetDiscordWebhookURL() string
	GetGoogleChatWebhookURL() string
}

WebhookService defines the methods for sending webhooks.

Jump to

Keyboard shortcuts

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