With this library you can easily create notification files for your Go projects. These must then be stored in the directory you specify so that echGo can read them.
go get github.com/echgo/notifile
You can use the following example to create a file. Please note that there are currently only the following notification channels: gotify
, pushover
, matrix
, telegram
, discord
, slack
, trello
, zendesk
, osticket
, twillo
, smtp
& webhook
.
data := notifile.Data{
Channels: []string{"gotify", "telegram"},
Headline: "New notification!",
Message: "Here you will find your message.",
}
err := notifile.Create(data, filepath.Join("var", "lib", "echgo", "notification")
if err != nil {
log.Fatalln(err)
}
Thanks to JetBrains for supporting me with this and other open source projects.