autoloader

package
v0.0.1-20231005-0001 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2023 License: MIT Imports: 34 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeforeLoadSetDefaults

func BeforeLoadSetDefaults(name string, cb func())

func GenerateConfig

func GenerateConfig() error

Deprecated func GenerateConfig(c Config) error {

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 SaveConfigFromMemory(cfg Config) error

func StartAutoLoader

func StartAutoLoader(c Config) error

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL