Documentation
¶
Index ¶
- Constants
- Variables
- func GetGlobalConfigPath() string
- func GetGlobalDdevDir() string
- func GetValidOmitContainers() []string
- func IsValidOmitContainers(containerList []string) bool
- func ReadGlobalConfig() error
- func ValidateGlobalConfig() error
- func WriteGlobalConfig(config GlobalConfig) error
- type GlobalConfig
- type InvalidOmitContainers
Constants ¶
const ( DdevSSHAgentContainer = "ddev-ssh-agent" DBAContainer = "dba" )
Container types used with ddev (duplicated from ddevapp, avoiding cross-package cycles)
const DdevGlobalConfigName = "global_config.yaml"
DdevGlobalConfigName is the name of the global config file.
Variables ¶
var DdevNoSentry = os.Getenv("DDEV_NO_SENTRY") == "true"
var ValidOmitContainers = map[string]bool{ DdevSSHAgentContainer: true, DBAContainer: true, }
Functions ¶
func GetGlobalConfigPath ¶
func GetGlobalConfigPath() string
GetGlobalConfigPath() gets the path to global config file
func GetGlobalDdevDir ¶
func GetGlobalDdevDir() string
GetGlobalDdevDir returns ~/.ddev, the global caching directory
func GetValidOmitContainers ¶
func GetValidOmitContainers() []string
GetValidOmitContainers is a helper function that returns a list of valid containers for OmitContainers.
func IsValidOmitContainers ¶
IsValidOmitContainers is a helper function to determine if a the OmitContainers array is valid
func ReadGlobalConfig ¶
func ReadGlobalConfig() error
ReadGlobalConfig() reads the global config file into DdevGlobalConfig
func ValidateGlobalConfig ¶
func ValidateGlobalConfig() error
ValidateGlobalConfig validates global config
func WriteGlobalConfig ¶
func WriteGlobalConfig(config GlobalConfig) error
WriteGlobalConfig writes the global config into ~/.ddev.
Types ¶
type GlobalConfig ¶
type GlobalConfig struct {
APIVersion string `yaml:"APIVersion"`
OmitContainers []string `yaml:"omit_containers"`
InstrumentationOptIn bool `yaml:"instrumentation_opt_in"`
LastUsedVersion string `yaml:"last_used_version"`
DeveloperMode bool `yaml:"developer_mode,omitempty"`
}
GlobalConfig is the struct defining ddev's global config
var ( // DdevGlobalConfig is the currently active global configuration struct DdevGlobalConfig GlobalConfig )
type InvalidOmitContainers ¶
type InvalidOmitContainers error