mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 16:26:38 +00:00
Add support for Slack as a notification channel type
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
@@ -4751,6 +4751,7 @@ components:
|
|||||||
enum:
|
enum:
|
||||||
- email
|
- email
|
||||||
- webhook
|
- webhook
|
||||||
|
- slack
|
||||||
example: "email"
|
example: "email"
|
||||||
NotificationEventType:
|
NotificationEventType:
|
||||||
type: string
|
type: string
|
||||||
@@ -4804,6 +4805,7 @@ components:
|
|||||||
Channel-specific target configuration. The shape depends on the `type` field:
|
Channel-specific target configuration. The shape depends on the `type` field:
|
||||||
- `email`: requires an `EmailTarget` object
|
- `email`: requires an `EmailTarget` object
|
||||||
- `webhook`: requires a `WebhookTarget` object
|
- `webhook`: requires a `WebhookTarget` object
|
||||||
|
- `slack`: requires a `WebhookTarget` object
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/EmailTarget'
|
- $ref: '#/components/schemas/EmailTarget'
|
||||||
- $ref: '#/components/schemas/WebhookTarget'
|
- $ref: '#/components/schemas/WebhookTarget'
|
||||||
@@ -4837,6 +4839,7 @@ components:
|
|||||||
Channel-specific target configuration. The shape depends on the `type` field:
|
Channel-specific target configuration. The shape depends on the `type` field:
|
||||||
- `email`: an `EmailTarget` object
|
- `email`: an `EmailTarget` object
|
||||||
- `webhook`: a `WebhookTarget` object
|
- `webhook`: a `WebhookTarget` object
|
||||||
|
- `slack`: a `WebhookTarget` object
|
||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/EmailTarget'
|
- $ref: '#/components/schemas/EmailTarget'
|
||||||
- $ref: '#/components/schemas/WebhookTarget'
|
- $ref: '#/components/schemas/WebhookTarget'
|
||||||
|
|||||||
@@ -686,6 +686,7 @@ func (e NetworkResourceType) Valid() bool {
|
|||||||
// Defines values for NotificationChannelType.
|
// Defines values for NotificationChannelType.
|
||||||
const (
|
const (
|
||||||
NotificationChannelTypeEmail NotificationChannelType = "email"
|
NotificationChannelTypeEmail NotificationChannelType = "email"
|
||||||
|
NotificationChannelTypeSlack NotificationChannelType = "slack"
|
||||||
NotificationChannelTypeWebhook NotificationChannelType = "webhook"
|
NotificationChannelTypeWebhook NotificationChannelType = "webhook"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -694,6 +695,8 @@ func (e NotificationChannelType) Valid() bool {
|
|||||||
switch e {
|
switch e {
|
||||||
case NotificationChannelTypeEmail:
|
case NotificationChannelTypeEmail:
|
||||||
return true
|
return true
|
||||||
|
case NotificationChannelTypeSlack:
|
||||||
|
return true
|
||||||
case NotificationChannelTypeWebhook:
|
case NotificationChannelTypeWebhook:
|
||||||
return true
|
return true
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user