Documentation
¶
Index ¶
- Variables
- type Config
- func (config Config) ApplyTransformFuncs(id string, structSchema any, path string, ...)
- func (config *Config) Load(data any, path string) error
- func (config *Config) LoadDir(path string, dir string, ext string, parser koanf.Parser) error
- func (config *Config) LoadEnv(transformFunc func(key string, value string) (string, any)) (*env.Env, error)
- func (config *Config) LoadFile(path string, parser koanf.Parser) (*file.File, error)
- func (config *Config) MergeLayers(layers ...*koanf.Koanf) error
- func (config *Config) OnReload(reloadFunc func(string))
- func (config *Config) TemplateConfig() error
- func (config *Config) WatchFile(fileProvider *file.File, path string)
- type TransformTarget
Constants ¶
This section is empty.
Variables ¶
View Source
var DELIM string = "."
Functions ¶
This section is empty.
Types ¶
type Config ¶
func (Config) ApplyTransformFuncs ¶
func (config Config) ApplyTransformFuncs(id string, structSchema any, path string, funcs map[string]func(string, any) (string, any))
Apply Transform funcs based on `transform` and `childtransform` in struct schema
func (*Config) LoadEnv ¶
func (config *Config) LoadEnv(transformFunc func(key string, value string) (string, any)) (*env.Env, error)
Load environment into Config with transformFunc
func (*Config) MergeLayers ¶
Merge layers into Config
func (*Config) TemplateConfig ¶
Template Config with environment variables
Click to show internal directories.
Click to hide internal directories.