Documentation
¶
Overview ¶
Package config provides global app config object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalConfig ¶
type GlobalConfig interface {
launchr.Service
// DirPath returns an absolute path to config directory.
DirPath() string
// Path provides an absolute path to global config.
Path(parts ...string) string
// EnsurePath creates all directories in the path.
EnsurePath(parts ...string) error
// Get returns a value by name to a parameter v. Parameter v must be a pointer to a value.
// Error may be returned on decode.
Get(name string, v interface{}) error
}
GlobalConfig is a config interface.
func GlobalConfigFromFS ¶
func GlobalConfigFromFS(root fs.FS) GlobalConfig
GlobalConfigFromFS parses global app config.
type GlobalConfigAware ¶
type GlobalConfigAware interface {
// SetGlobalConfig sets a global config to the struct.
SetGlobalConfig(GlobalConfig)
}
GlobalConfigAware provides an interface for structs to support global configuration setting.
Click to show internal directories.
Click to hide internal directories.