Go Notifier is a notification service written in Go that leverages a bot to send messages based on various triggers or events. The service is designed to be easily configurable and extendable, making it suitable for various notification use cases.
Example: https://t.me/go_versions
- Bot Integration: Utilizes a bot to send notifications.
- Customizable Templates: Supports customizable message templates using Markdown.
- Environment Configuration: Configurable via
.env
files for easy setup. - Docker Support: Includes Dockerfile and Docker Compose for containerized deployments.
cmd/notifier/main.go
: The entry point of the application.internal/
: Contains core logic for the bot and parser functionalities.bot.go
: Contains the logic for interacting with the bot.parser.go
: Contains parsing logic for handling data.parser_test.go
: Unit tests for the parser.
templates/
: Directory for storing message templates..env
: File for environment-specific configuration.Dockerfile
: Dockerfile for building the Go application.docker-compose.yml
: Docker Compose file for setting up and running the application in a containerized environment.
- Go 1.23 or later
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/iooojik/go-notifier.git cd go-notifier
-
Set up environment variables:
Copy the
.env
to.cfg
and fill in the required variables. (send message from your public to https://t.me/my_id_bot to get chat ID)cp .env .cfg
-
Build and run the application:
go build -o notifier ./cmd/notifier ./notifier
-
Build the Docker image:
docker build -t go-notifier .
-
Run the container:
docker compose build && docker compose up
- Configure your message templates in the
templates
folder. - Adjust environment variables in the
.env
file to suit your needs.
Contributions are welcome! Please open an issue or submit a pull request.