Hermes/cmd/notifyer/config.go

32 lines
689 B
Go

package main
import "backend/pkg/config"
func LoadConfig(filePath string) (Config, error) {
return config.NewFromFile[Config](filePath)
}
type Config struct {
App struct {
Port uint16 `yaml:"port"`
LogFile string `yaml:"logFile"`
ServiceUrl string `yaml:"serviceUrl"`
}
Kafka struct {
Brokers []string `yaml:"brokers"`
Topic string `yaml:"topic"`
ConsumerGroupId string `yaml:"consumerGroupId"`
} `yaml:"kafka"`
SMTP ConfigSMTP `yaml:"smtp"`
}
type ConfigSMTP struct {
Server string `yaml:"server"`
Port int `yaml:"port"`
Login string `yaml:"login"`
Password string `yaml:"password"`
Email string `yaml:"email"`
}