Documentation ¶
Index ¶
- func BeforeLoadSetDefaults(name string, cb func())
- func GenerateConfig() error
- func GenerateConfigFromMemory() error
- func GetBackupFullPath() string
- func GetCleanAppFileName() string
- func GetConfigFileName() string
- func GetConfigFilePath() string
- func GetConfigFileType() string
- func GetConfigFullFileName() string
- func GetConfigPath() string
- func GetConfigTmpFilePath() string
- func GetEnvFullConfigPath() string
- func GetTmpConfigFileName() string
- func IsConfigExists() bool
- func OverrideGlobalConfigPath(newConfigPath string)
- func SaveConfigFromMemory(cfg Config) error
- func StartAutoLoader(c Config) error
- func StopAutoLoader()
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeforeLoadSetDefaults ¶
func BeforeLoadSetDefaults(name string, cb func())
func GenerateConfigFromMemory ¶
func GenerateConfigFromMemory() error
func GetBackupFullPath ¶
func GetBackupFullPath() string
func GetCleanAppFileName ¶
func GetCleanAppFileName() string
func GetConfigFileName ¶
func GetConfigFileName() string
GetConfigFileName We should have the same config name if the app name is not changed (doesn't matter if it's on windows or Linux) we should remove the file extension!
func GetConfigFilePath ¶
func GetConfigFilePath() string
func GetConfigFileType ¶
func GetConfigFileType() string
func GetConfigFullFileName ¶
func GetConfigFullFileName() string
func GetConfigPath ¶
func GetConfigPath() string
func GetConfigTmpFilePath ¶
func GetConfigTmpFilePath() string
GetConfigTmpFilePath -> this is the temporary file path of the config... it's only for comparation purpose
func GetEnvFullConfigPath ¶
func GetEnvFullConfigPath() string
func GetTmpConfigFileName ¶
func GetTmpConfigFileName() string
func IsConfigExists ¶
func IsConfigExists() bool
func OverrideGlobalConfigPath ¶
func OverrideGlobalConfigPath(newConfigPath string)
func SaveConfigFromMemory ¶
func StartAutoLoader ¶
func StopAutoLoader ¶
func StopAutoLoader()
Types ¶
type Config ¶
type Config struct { // This is where the Custom Config data is saved... it's a pointer! CustomConfig interface{} // This is the structure of the Custom Config, from which the yaml is generated CustomConfigModel interface{} // Here we define Additional logging channels if required... for example we know that our app // has some functionality which requires logging channeling, so everything is isolated and understood // so, we also need to generate a config file which already has that channels without a user intervention // or having a ready template file! So in this case we dictate from here additional channels AdditionalLoggingChannels map[string]loggingConfig.Config }
var LoadedConfig Config
Click to show internal directories.
Click to hide internal directories.