Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultDataRetentionInDays = 30
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type YamlConfig ¶
type YamlConfig struct { DbHost string `yaml:"dbhost" validate:"required"` DbPort string `yaml:"dbport" validate:"required,gte=1,lte=65535"` DbUser string `yaml:"dbuser" validate:"required"` DbPassword string `yaml:"dbpassword" validate:"required"` DbName string `yaml:"dbname" validate:"required"` LogLevel string `yaml:"loglevel" ` RedisHost string `yaml:"redis_host" validate:"required"` RedisPort string `yaml:"redis_port" validate:"required"` RedisPassword string `yaml:"redis_password"` RedisStream string `yaml:"redis_stream" validate:"required"` DataRetentionInDays int `yaml:"data_retention_in_days" validate:"required,gte=1"` }
Struct representing the yaml configuration file passed as a parameter to the program
func LoadConfigFromEnv ¶
func LoadConfigFromEnv() *YamlConfig
func LoadConfigFromFile ¶
func LoadConfigFromFile(filename string) (*YamlConfig, error)
func (*YamlConfig) IsConfigValid ¶
func (cfg *YamlConfig) IsConfigValid() error
Click to show internal directories.
Click to hide internal directories.