From dbe01ad7ca79efad640e5b00f108c46d657b9442 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 23 Jun 2022 11:32:57 +0200 Subject: [PATCH] config/config.go: Adding telegram. --- config.example.json | 4 ++++ config/config.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/config.example.json b/config.example.json index ffb03f8..153634a 100644 --- a/config.example.json +++ b/config.example.json @@ -6,6 +6,10 @@ "max_messages_in_flight": 10, "start_block_num": 4294967295, "end_block_num": 4294967295, + "telegram": { + "id": "110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw", + "channel": -123456789 + }, "redis": { "addr": "localhost:6379", "password": "", diff --git a/config/config.go b/config/config.go index f94b1b7..f23c419 100644 --- a/config/config.go +++ b/config/config.go @@ -15,6 +15,11 @@ type RedisConfig struct { CacheID string `json:"cache_id"` } +type TelegramConfig struct { + Id string `json:"id"` + Channel int64 `json:"channel"` +} + type Config struct { Name string `json:"name"` ShipApi string `json:"ship_api"` @@ -22,6 +27,8 @@ type Config struct { Redis RedisConfig `json:"redis"` + Telegram TelegramConfig `json:"telegram"` + IrreversibleOnly bool `json:"irreversible_only"` MaxMessagesInFlight uint32 `json:"max_messages_in_flight"` StartBlockNum uint32 `json:"start_block_num"`