2024-05-27 13:01:39 +02:00

28 lines
510 B
Go

package main
import (
"strings"
"wazuh-notify/log"
"wazuh-notify/notification"
"wazuh-notify/services"
)
func main() {
inputParams := services.InitNotify()
for _, target := range strings.Split(inputParams.General.Targets, ", ") {
switch target {
case "discord":
log.Log(target)
notification.SendDiscord(inputParams)
case "ntfy":
log.Log(target)
notification.SendNtfy(inputParams)
case "slack":
log.Log(target)
notification.SendSlack(inputParams)
}
}
log.CloseLogFile()
}