Documentation ¶
Index ¶
- Variables
- func AppendToConfig(lines string, confFilename string)
- func CreateEnvFileWithPreset(preset string)
- func GenerateRepositoriesPath() string
- func GetBackendDeveloperPreset() string
- func GetBoolUserInput(question string) bool
- func GetConfigDefaultContent(fileName string) []byte
- func GetDefaultSaveMessage() string
- func GetDotfilesRepository() string
- func GetDotfilesRepositoryPath() string
- func GetFrontendDeveloperPreset() string
- func GetInitialSetupUsage() []byte
- func GetOpsPreset() string
- func GetPreset(presetName string) []byte
- func GetSoftwareEngineerPreset() string
- func GetUserInput(question string) string
- func GetUserPrivateInput(question string) string
- func RefreshVipers()
- func SetupConfigFile(ConfigFileName string)
- func SetupConfigFiles()
- func UpdateYamlFile(fileFullPath string, fileContent map[string]interface{})
- type YamlConfigMap
Constants ¶
This section is empty.
Variables ¶
var ConfigDirPath string
ConfigDirPath represents the path to config directory.
var ConfigFilesPathes map[string]string
ConfigFilesPathes contains every config file pathes per filename.
var DotfilesDirPath string
DotfilesDirPath represents the full path to the dotfiles directory.
var IanConfigPath string
IanConfigPath represents the path to ian config directory.
var Vipers map[string]*viper.Viper
Vipers contains all the initialized Vipers (config, env)
Functions ¶
func AppendToConfig ¶
AppendToConfig takes a string as an argument and write it as new line(s) in the given conf file.
func CreateEnvFileWithPreset ¶
func CreateEnvFileWithPreset(preset string)
CreateEnvFileWithPreset write an env file with the selected preset.
func GenerateRepositoriesPath ¶
func GenerateRepositoriesPath() string
GenerateRepositoriesPath creates conf line containing the user's input.
func GetBackendDeveloperPreset ¶
func GetBackendDeveloperPreset() string
GetBackendDeveloperPreset returns the Backend Engineer preset content.
func GetBoolUserInput ¶
GetBoolUserInput ask question and return true if the user agreed otherwise false.
func GetConfigDefaultContent ¶
GetConfigDefaultContent returns the content of the default config.yml (As nothing is preset for now, this function actually returns an empty string)
func GetDefaultSaveMessage ¶
func GetDefaultSaveMessage() string
GetDefaultSaveMessage returns as a string the default save message.
func GetDotfilesRepository ¶
func GetDotfilesRepository() string
GetDotfilesRepository creates conf line containing the user's input.
func GetDotfilesRepositoryPath ¶
func GetDotfilesRepositoryPath() string
GetDotfilesRepositoryPath returns the dotfiles repository path.
func GetFrontendDeveloperPreset ¶
func GetFrontendDeveloperPreset() string
GetFrontendDeveloperPreset returns the Frontend Engineer preset content.
func GetInitialSetupUsage ¶
func GetInitialSetupUsage() []byte
GetInitialSetupUsage returns the usage when using ian for the first time
func GetOpsPreset ¶
func GetOpsPreset() string
GetOpsPreset returns the Ops Engineer preset content.
func GetSoftwareEngineerPreset ¶
func GetSoftwareEngineerPreset() string
GetSoftwareEngineerPreset returns the Software Engineer preset content.
func GetUserInput ¶
GetUserInput ask question and return user input.
func GetUserPrivateInput ¶
GetUserPrivateInput ask question and return user input (silent stdin).
func RefreshVipers ¶
func RefreshVipers()
RefreshVipers is a helper called to refresh the configuration.
func SetupConfigFile ¶
func SetupConfigFile(ConfigFileName string)
SetupConfigFile creates a config directory and the config file if not exists.
func SetupConfigFiles ¶
func SetupConfigFiles()
SetupConfigFiles creates a config directory and the config files if not exists.
func UpdateYamlFile ¶
UpdateYamlFile write a Viper content to a yaml file.
Types ¶
type YamlConfigMap ¶
type YamlConfigMap struct { Managers map[string]map[string]string `json:"managers"` Repositories map[string]string `json:"repositories"` Setup map[string][]string `json:"setup"` Packages map[string]map[string]string `json:"packages"` }
YamlConfigMap is used to marshal/unmarshal config file.
var ConfigMap YamlConfigMap
ConfigMap contains the config content.