Help us shape the future of Go! Take the 2026 Go Developer Survey

notification

package
v2.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NotificationProviderDiscord is the builtin Discord notification provider.
	NotificationProviderDiscord Provider = "discord"

	// NotificationProviderEmail is the builtin Email notification provider.
	NotificationProviderEmail Provider = "email"

	// NotificationProviderTelegram is the builtin Telegram notification provider.
	NotificationProviderTelegram Provider = "telegram"

	// NotificationProviderSignal is the builtin Signal notification provider.
	NotificationProviderSignal Provider = "signal"

	// NotificationProviderSlack is the builtin Slack notification provider.
	NotificationProviderSlack Provider = "slack"

	// NotificationProviderNtfy is the builtin Ntfy notification provider.
	NotificationProviderNtfy Provider = "ntfy"

	// NotificationProviderPushover is the builtin Pushover notification provider.
	NotificationProviderPushover Provider = "pushover"

	// NotificationProviderGotify is the builtin Gotify notification provider.
	NotificationProviderGotify Provider = "gotify"

	// NotificationProviderMatrix is the builtin Matrix webhook notification provider.
	NotificationProviderMatrix Provider = "matrix"

	// NotificationProviderGoogleChat is the builtin Google Chat notification provider.
	NotificationProviderGoogleChat Provider = "googlechat"

	// NotificationProviderGeneric is the builtin Generic webhook notification provider.
	NotificationProviderGeneric Provider = "generic"

	DispatchKindImageUpdate          DispatchKind = "image_update"
	DispatchKindBatchImageUpdate     DispatchKind = "batch_image_update"
	DispatchKindContainerUpdate      DispatchKind = "container_update"
	DispatchKindBatchContainerUpdate DispatchKind = "batch_container_update"
	DispatchKindVulnerabilityFound   DispatchKind = "vulnerability_found"
	DispatchKindPruneReport          DispatchKind = "prune_report"
	DispatchKindAutoHeal             DispatchKind = "auto_heal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DispatchAutoHeal

type DispatchAutoHeal struct {
	ContainerName string `json:"containerName"`
	ContainerID   string `json:"containerId"`
}

type DispatchBatchContainerUpdate added in v2.9.0

type DispatchBatchContainerUpdate struct {
	Updates []DispatchContainerUpdate `json:"updates"`
}

type DispatchBatchImageUpdate

type DispatchBatchImageUpdate struct {
	Updates map[string]*imageupdate.Response `json:"updates"`
}

type DispatchContainerUpdate

type DispatchContainerUpdate struct {
	ContainerName string `json:"containerName"`
	ImageRef      string `json:"imageRef"`
	OldDigest     string `json:"oldDigest,omitempty"`
	NewDigest     string `json:"newDigest,omitempty"`
}

type DispatchImageUpdate

type DispatchImageUpdate struct {
	ImageRef   string               `json:"imageRef"`
	UpdateInfo imageupdate.Response `json:"updateInfo"`
}

type DispatchKind

type DispatchKind string

type DispatchPruneReport

type DispatchPruneReport struct {
	Result system.PruneAllResult `json:"result"`
}

type DispatchRequest

type DispatchRequest struct {
	Kind                 DispatchKind                  `json:"kind"`
	ImageUpdate          *DispatchImageUpdate          `json:"imageUpdate,omitempty"`
	BatchImageUpdate     *DispatchBatchImageUpdate     `json:"batchImageUpdate,omitempty"`
	ContainerUpdate      *DispatchContainerUpdate      `json:"containerUpdate,omitempty"`
	BatchContainerUpdate *DispatchBatchContainerUpdate `json:"batchContainerUpdate,omitempty"`
	VulnerabilityFound   *DispatchVulnerabilityFound   `json:"vulnerabilityFound,omitempty"`
	PruneReport          *DispatchPruneReport          `json:"pruneReport,omitempty"`
	AutoHeal             *DispatchAutoHeal             `json:"autoHeal,omitempty"`
}

type DispatchResponse added in v2.3.0

type DispatchResponse struct {
	Message   string `json:"message"`
	Delivered int    `json:"delivered"`
}

type DispatchVulnerabilityFound

type DispatchVulnerabilityFound struct {
	CVEID            string `json:"cveId"`
	CVELink          string `json:"cveLink"`
	Severity         string `json:"severity"`
	ImageName        string `json:"imageName"`
	FixedVersion     string `json:"fixedVersion,omitempty"`
	PkgName          string `json:"pkgName,omitempty"`
	InstalledVersion string `json:"installedVersion,omitempty"`
}

type Provider

type Provider string

Provider is the type for notification provider identifiers.

type Response

type Response struct {
	// ID is the unique identifier of the notification settings.
	//
	// Required: true
	ID uint `json:"id"`

	// Provider is the notification provider type.
	//
	// Required: true
	Provider Provider `json:"provider"`

	// Enabled indicates if the notification provider is enabled.
	//
	// Required: true
	Enabled bool `json:"enabled"`

	// Config contains the provider-specific configuration.
	//
	// Required: true
	Config base.JsonObject `json:"config"`
}

type TestResponse added in v2.3.2

type TestResponse struct {
	// Message describes the test outcome.
	Message string `json:"message"`

	// Warning explains why a real notification of the tested kind would not
	// send (provider disabled or event unsubscribed). Empty when none applies.
	Warning string `json:"warning,omitempty"`
}

TestResponse is the result of a test notification send.

type Update

type Update struct {
	// Provider is the notification provider type.
	//
	// Required: true
	Provider Provider `json:"provider" binding:"required"`

	// Enabled indicates if the notification provider is enabled.
	//
	// Required: true
	Enabled bool `json:"enabled"`

	// Config contains the provider-specific configuration.
	//
	// Required: true
	Config base.JsonObject `json:"config" binding:"required"`
}

Jump to

Keyboard shortcuts

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