autoloader

package
v0.0.1-20220726-0003 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 38 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 GetCustomConfigFilePath

func GetCustomConfigFilePath() string

func GetTmpConfigFileName

func GetTmpConfigFileName() string

func IsConfigExists

func IsConfigExists() bool

func IsConfigValid

func IsConfigValid() bool

func IsCustomConfigExists

func IsCustomConfigExists() 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
}

Jump to

Keyboard shortcuts

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