my-log/config/types.go

27 lines
456 B
Go

package config
type Config struct {
Input Input
Outputs Outputs `toml:"output"`
}
type Input struct {
Path string `env:"LOG_PATH"`
Recurse bool `env:"LOG_RECURSE"`
Ext string `env:"LOG_EXT"`
}
type Outputs map[string]Output
type Output struct {
Enabled bool
Config map[string]any
}
type Stdout struct {
Json bool `env:"LOG_STDOUT_JSON" mapstructure:"json"`
}
type stdoutEnabled struct {
Enabled bool `env:"LOG_STDOUT_ENABLED"`
}