Archived
1
0
Fork 0

feat: Add notification templates (#2)

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-10-13 14:38:31 +02:00
commit 632da28954
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7
11 changed files with 154 additions and 67 deletions

View file

@ -8,12 +8,13 @@ import (
// Config to receive settings from the configuration file
type Config struct {
DatabaseFile string `yaml:"database-file"`
MaxBlocks int `yaml:"max-blocks"`
MaxPayments int `yaml:"max-payments"`
Pools []PoolConfig `yaml:"pools"`
Miners []MinerConfig `yaml:"miners"`
TelegramConfig TelegramConfig `yaml:"telegram"`
DatabaseFile string `yaml:"database-file"`
MaxBlocks int `yaml:"max-blocks"`
MaxPayments int `yaml:"max-payments"`
Pools []PoolConfig `yaml:"pools"`
Miners []MinerConfig `yaml:"miners"`
TelegramConfig TelegramConfig `yaml:"telegram"`
NotificationTemplates NotificationTemplatesConfig `yaml:"notification-templates"`
}
// PoolConfig to store Pool configuration
@ -37,6 +38,14 @@ type TelegramConfig struct {
ChannelName string `yaml:"channel-name"`
}
// NotificationTemplatesConfig to store notifications templates configuration
type NotificationTemplatesConfig struct {
Balance string `yaml:"balance"`
Payment string `yaml:"payment"`
Block string `yaml:"block"`
OfflineWorker string `yaml:"offline-worker"`
}
// NewConfig creates a Config with default values
func NewConfig() *Config {
return &Config{