Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/echgo/notifile
An little library to create notification files with golang.
https://github.com/echgo/notifile
echgo go golang golang-library hacktoberfest notification-file
Last synced: 11 days ago
JSON representation
An little library to create notification files with golang.
- Host: GitHub
- URL: https://github.com/echgo/notifile
- Owner: echgo
- License: mit
- Created: 2022-02-10T15:17:36.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-05T15:46:16.000Z (about 2 years ago)
- Last Synced: 2024-11-05T21:48:34.326Z (about 2 months ago)
- Topics: echgo, go, golang, golang-library, hacktoberfest, notification-file
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# notifile
[![GitHub go.mod Go version of a Go module](https://img.shields.io/github/go-mod/go-version/echgo/notifile.svg)](https://golang.org/) [![Go](https://github.com/echgo/notifile/actions/workflows/go.yml/badge.svg)](https://github.com/echgo/notifile/actions/workflows/go.yml) [![CodeQL](https://github.com/echgo/notifile/actions/workflows/codeql.yml/badge.svg)](https://github.com/echgo/notifile/actions/workflows/codeql.yml) [![CompVer](https://github.com/echgo/notifile/actions/workflows/compver.yml/badge.svg)](https://github.com/echgo/notifile/actions/workflows/compver.yml) [![Go Doc](https://godoc.org/github.com/echgo/notifile?status.svg)](https://pkg.go.dev/github.com/echgo/notifile) [![Go Report Card](https://goreportcard.com/badge/github.com/echgo/notifile)](https://goreportcard.com/report/github.com/echgo/notifile) [![GitHub issues](https://img.shields.io/github/issues/echgo/notifile)](https://github.com/echgo/notifile/issues) [![GitHub forks](https://img.shields.io/github/forks/echgo/notifile)](https://github.com/echgo/notifile/network) [![GitHub stars](https://img.shields.io/github/stars/echgo/notifile)](https://github.com/echgo/notifile/stargazers) [![GitHub license](https://img.shields.io/github/license/echgo/notifile)](https://github.com/echgo/notifile/blob/master/LICENSE)
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.
## Install
```console
go get github.com/echgo/notifile
```## How to use?
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`.
```go
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)
}
```## Special thanks
Thanks to [JetBrains](https://github.com/JetBrains) for supporting me with this and other [open source projects](https://www.jetbrains.com/community/opensource/#support).