Add support for Slack as a notification channel type

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2026-04-13 17:39:32 +03:00
parent 13539543af
commit 91a6577182
2 changed files with 6 additions and 0 deletions

View File

@@ -4751,6 +4751,7 @@ components:
enum:
- email
- webhook
- slack
example: "email"
NotificationEventType:
type: string
@@ -4804,6 +4805,7 @@ components:
Channel-specific target configuration. The shape depends on the `type` field:
- `email`: requires an `EmailTarget` object
- `webhook`: requires a `WebhookTarget` object
- `slack`: requires a `WebhookTarget` object
oneOf:
- $ref: '#/components/schemas/EmailTarget'
- $ref: '#/components/schemas/WebhookTarget'
@@ -4837,6 +4839,7 @@ components:
Channel-specific target configuration. The shape depends on the `type` field:
- `email`: an `EmailTarget` object
- `webhook`: a `WebhookTarget` object
- `slack`: a `WebhookTarget` object
oneOf:
- $ref: '#/components/schemas/EmailTarget'
- $ref: '#/components/schemas/WebhookTarget'

View File

@@ -686,6 +686,7 @@ func (e NetworkResourceType) Valid() bool {
// Defines values for NotificationChannelType.
const (
NotificationChannelTypeEmail NotificationChannelType = "email"
NotificationChannelTypeSlack NotificationChannelType = "slack"
NotificationChannelTypeWebhook NotificationChannelType = "webhook"
)
@@ -694,6 +695,8 @@ func (e NotificationChannelType) Valid() bool {
switch e {
case NotificationChannelTypeEmail:
return true
case NotificationChannelTypeSlack:
return true
case NotificationChannelTypeWebhook:
return true
default: