globalconfig

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DdevSSHAgentContainer = "ddev-ssh-agent"
	DBAContainer          = "dba"
)

Container types used with ddev (duplicated from ddevapp, avoiding cross-package cycles)

View Source
const DdevGlobalConfigName = "global_config.yaml"

DdevGlobalConfigName is the name of the global config file.

Variables

View Source
var DdevNoSentry = os.Getenv("DDEV_NO_SENTRY") == "true"
View Source
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

func IsValidOmitContainers(containerList []string) bool

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

Jump to

Keyboard shortcuts

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