Go Blog Updates – Telegram Bot

This service consumes events about new posts in go blog (go.dev) from message broker (rabbitmq) (gbu-scanner service publishes these events) and sends notifications to telegram bot’s subscribers.
It uses PostgreSQL as a storage for bot’s users.

ENV Configuration:

name type description
TELEGRAM_BOT_TOKEN string Token to authorize in telegram
POSTGRES_HOST string Database host
POSTGRES_USER string Database user
POSTGRES_PASS string Database password
POSTGRES_DB_NAME string Database name
RABBIT_HOST string Rabbit host
RABBIT_USER string Rabbit user
RABBIT_PASS string Rabbit password
RABBIT_VHOST string Rabbit vhost
RABBIT_AMQPS bool Flag to use amqps protocol instead of amqp
RABBIT_RECONNECT_DELAY int Delay (seconds) before attempting to reconnect to rabbit after loosing connection
MESSAGES_SENDING_DELAY int Delay (milliseconds) between sending messages in telegram to avoid hitting limits

Env template for sourcing is deployments/local.env

$ source deployments/local.env

Makefile commands:

name description
lint Runs linters
test Runs tests, but there are no tests
run Sources env variables from deployments/local.env and runs app

Директория scripts содержит скрипты, которые вызываются командами из Makefile

GitHub

View Github