feat: Add notification templates (#2)
Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
b9902f0623
commit
632da28954
11 changed files with 154 additions and 67 deletions
21
config.go
21
config.go
|
@ -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{
|
||||
|
|
Reference in a new issue