Documentation ¶
Index ¶
- Variables
- func CreateConfig(v *viper.Viper, path, file string) error
- func CreateProjectConfig(projectPath string)
- func GetString(config string) string
- func InitConfig()
- func ProjectConfigExists() bool
- func ProjectRoot() (string, error)
- func SetHomeString(config, value string)
- func SetProjectString(config, value string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigFileName is the name of the config files (home / project) ConfigFileName = "config" // ConfigFileType is the config file extension ConfigFileType = "json" // ConfigFileNameWithExt is the config filename with extension ConfigFileNameWithExt = fmt.Sprintf("%s.%s", ConfigFileName, ConfigFileType) // ConfigDir is the directory for astro files ConfigDir = ".astro" // CFGPostgresUser is the default postgres user CFGPostgresUser = "postgres.user" // CFGPostgresPassword is the default postgres password CFGPostgresPassword = "postgres.password" // CFGPostgresHost is the default postgres host CFGPostgresHost = "postgres.host" // CFGPostgresPort is the default postgres port CFGPostgresPort = "postgres.port" // CFGRegistryAuthority is the default docker registry CFGRegistryAuthority = "docker.registry.authority" // CFGRegistryUser is the default docker registry CFGRegistryUser = "docker.registry.user" // CFGRegistryPassword is the default docker registry CFGRegistryPassword = "docker.registry.password" // CFGProjectName is the name of a project CFGProjectName = "project.name" // HomeConfigPath is the path to the users global directory HomeConfigPath = filepath.Join(utils.GetHomeDir(), ConfigDir) // HomeConfigFile is the global config file HomeConfigFile = filepath.Join(HomeConfigPath, ConfigFileNameWithExt) )
Functions ¶
func CreateConfig ¶
CreateConfig creates a config file in the given directory
func CreateProjectConfig ¶
func CreateProjectConfig(projectPath string)
CreateProjectConfig creates a project config file
func ProjectConfigExists ¶
func ProjectConfigExists() bool
ProjectConfigExists returns a boolean indicating if a project config file exists
func ProjectRoot ¶
ProjectRoot returns the path to the nearest project root
func SetHomeString ¶
func SetHomeString(config, value string)
SetHomeString sets a string value in home config
func SetProjectString ¶
func SetProjectString(config, value string)
SetProjectString sets a string value in project config
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.