Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config configModel
View Source
var Ip string
Functions ¶
func EnsureConfig ¶ added in v0.2.1
func EnsureRuntimePaths ¶ added in v0.2.1
func EnsureRuntimePaths() error
func LoadConfig ¶ added in v0.2.0
func LoadConfig() error
LoadConfig reads config.yaml and populates the global Config. Environment variables ETL_USERNAME, ETL_PASSWORD, ETL_JWT_SECRET, ETL_API_SECRET, ETL_AES_KEY take precedence over values in the config file.
func SaveConfig ¶
func SaveConfig() error
Types ¶
type DatabaseConfig ¶ added in v0.2.0
type DatabaseConfig struct {
Driver string `yaml:"driver"` // sqlite (default) | mysql | postgres
Path string `yaml:"path"` // SQLite file path, default: ./data.db (only used when driver=sqlite)
DSN string `yaml:"dsn"` // MySQL/PostgreSQL DSN, e.g. "user:pass@tcp(host:3306)/db?parseTime=True"
MaxOpenConns int `yaml:"maxOpenConns"` // default: 10
MaxIdleConns int `yaml:"maxIdleConns"` // default: 5
ConnMaxLifetime int `yaml:"connMaxLifetime"` // seconds, default: 300
}
type LogConfig ¶ added in v0.2.0
type LogConfig struct {
Filename string `yaml:"filename"` // log file path, default: ./log/app.log
MaxSize int `yaml:"maxSize"` // MB per file, default: 20
MaxBackups int `yaml:"maxBackups"` // number of backups, default: 3
MaxAge int `yaml:"maxAge"` // days to retain, default: 1
Compress bool `yaml:"compress"` // gzip old files, default: true
}
type PipelineConfig ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.