mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-15 23:06: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:
|
||||
- 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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user