nodeps

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MariaDB55  = "5.5"
	MariaDB100 = "10.0"
	MariaDB101 = "10.1"
	MariaDB102 = "10.2"
	MariaDB103 = "10.3"
	MariaDB104 = "10.4"
	MariaDB105 = "10.5"
)

MariaDB Versions

View Source
const (
	MySQL55 = "5.5"
	MySQL56 = "5.6"
	MySQL57 = "5.7"
	MySQL80 = "8.0"
)

Oracle MySQL versions

View Source
const (
	PHP56 = "5.6"
	PHP70 = "7.0"
	PHP71 = "7.1"
	PHP72 = "7.2"
	PHP73 = "7.3"
	PHP74 = "7.4"
	PHP80 = "8.0"
)

PHP Versions

View Source
const (
	MariaDB = "mariadb"
	MySQL   = "mysql"
)

Database Types

View Source
const (
	DdevSSHAgentContainer = "ddev-ssh-agent"
	DBAContainer          = "dba"
	DBContainer           = "db"
	WebContainer          = "web"
	RouterContainer       = "ddev-router"
)

Container types used with ddev

View Source
const (
	WebserverNginxFPM  = "nginx-fpm"
	WebserverApacheFPM = "apache-fpm"
)

Webserver types

View Source
const (
	AppTypeBackdrop  = "backdrop"
	AppTypeDrupal6   = "drupal6"
	AppTypeDrupal7   = "drupal7"
	AppTypeDrupal8   = "drupal8"
	AppTypeDrupal9   = "drupal9"
	AppTypePHP       = "php"
	AppTypeTYPO3     = "typo3"
	AppTypeWordPress = "wordpress"
	AppTypeMagento   = "magento"
	AppTypeMagento2  = "magento2"
	AppTypeLaravel   = "laravel"
	AppTypeShopware6 = "shopware6"
)

App types

View Source
const (
	// DdevDefaultRouterHTTPPort is the default router HTTP port
	DdevDefaultRouterHTTPPort = "80"

	// DdevDefaultRouterHTTPSPort is the default router HTTPS port
	DdevDefaultRouterHTTPSPort = "443"
	// DdevDefaultPHPMyAdminPort is the default router port for dba/PHPMyadmin
	DdevDefaultPHPMyAdminPort      = "8036"
	DdevDefaultPHPMyAdminHTTPSPort = "8037"
	// DdevDefaultMailhogPort is the default router port for Mailhog
	DdevDefaultMailhogPort      = "8025"
	DdevDefaultMailhogHTTPSPort = "8026"
	// DdevDefaultTLD is the top-level-domain used by default, can be overridden
	DdevDefaultTLD                  = "ddev.site"
	InternetDetectionTimeoutDefault = 750
)

Ports and other defaults

View Source
const MariaDBDefaultVersion = MariaDB103

MariaDBDefaultVersion is the default MariaDB version

View Source
const PHPDefault = PHP74

PHPDefault is the default PHP version, overridden by $DDEV_PHP_VERSION

View Source
const (
	// ProviderDefault contains the name of the default provider which will be used if one is not otherwise specified.
	ProviderDefault = "default"
)

Providers TODO: This should be removed as many providers will now be valid

Variables

View Source
var FailOnHookFailDefault = false

FailOnHookFailDefault is the default value for app.FailOnHookFail

View Source
var InstrumentationTags = map[string]string{}
View Source
var NFSMountEnabledDefault = false

NFSMountEnabledDefault is default value for app.NFSMountEnabled

View Source
var ValidMariaDBVersions = map[string]bool{
	MariaDB55:  true,
	MariaDB100: true,
	MariaDB101: true,
	MariaDB102: true,
	MariaDB103: true,
	MariaDB104: true,
	MariaDB105: true,
}
View Source
var ValidMySQLVersions = map[string]bool{
	MySQL55: true,
	MySQL56: true,
	MySQL57: true,
	MySQL80: true,
}
View Source
var ValidPHPVersions = map[string]bool{
	PHP56: true,
	PHP70: true,
	PHP71: true,
	PHP72: true,
	PHP73: true,
	PHP74: true,
	PHP80: true,
}

ValidPHPVersions should be updated whenever PHP versions are added or removed, and should be used to ensure user-supplied values are valid.

View Source
var ValidWebserverTypes = map[string]bool{
	WebserverNginxFPM:  true,
	WebserverApacheFPM: true,
}

ValidWebserverTypes should be updated whenever supported webserver types are added or removed, and should be used to ensure user-supplied values are valid.

View Source
var WebserverDefault = WebserverNginxFPM

WebserverDefault is the default webserver type, overridden by $DDEV_WEBSERVER_TYPE

Functions

func ArrayContainsString

func ArrayContainsString(slice []string, element string) bool

ArrayContainsString returns true if slice contains element

func GetValidMariaDBVersions added in v1.12.0

func GetValidMariaDBVersions() []string

GetValidMariaDBVersions is a helper function that returns a list of valid MariaDB versions.

func GetValidMySQLVersions added in v1.12.0

func GetValidMySQLVersions() []string

GetValidMySQLVersions is a helper function that returns a list of valid MySQL versions.

func GetValidOmitContainers added in v1.12.0

func GetValidOmitContainers() []string

GetValidOmitContainers is a helper function that returns a list of valid containers for OmitContainers.

func GetValidPHPVersions added in v1.12.0

func GetValidPHPVersions() []string

GetValidPHPVersions is a helper function that returns a list of valid PHP versions.

func GetValidWebserverTypes added in v1.12.0

func GetValidWebserverTypes() []string

GetValidWebserverTypes is a helper function that returns a list of valid webserver types.

func GetWSLDistro added in v1.15.0

func GetWSLDistro() string

GetWSLDistro returns the WSL2 distro name if on Linux

func IsValidMariaDBVersion added in v1.12.0

func IsValidMariaDBVersion(MariaDBVersion string) bool

IsValidMariaDBVersion is a helper function to determine if a MariaDB version is valid, returning true if the supplied MariaDB version is valid and false otherwise.

func IsValidMySQLVersion added in v1.12.0

func IsValidMySQLVersion(v string) bool

IsValidMySQLVersion is a helper function to determine if a MySQL version is valid, returning true if the supplied version is valid and false otherwise.

func IsValidOmitContainers added in v1.12.0

func IsValidOmitContainers(containerList []string) bool

IsValidOmitContainers is a helper function to determine if a the OmitContainers array is valid

func IsValidPHPVersion added in v1.12.0

func IsValidPHPVersion(phpVersion string) bool

IsValidPHPVersion is a helper function to determine if a PHP version is valid, returning true if the supplied PHP version is valid and false otherwise.

func IsValidWebserverType added in v1.12.0

func IsValidWebserverType(webserverType string) bool

IsValidWebserverType is a helper function to determine if a webserver type is valid, returning true if the supplied webserver type is valid and false otherwise.

func IsWSL2 added in v1.17.0

func IsWSL2() bool

IsWSL2() returns true if running WSL2

func PosString added in v1.16.0

func PosString(slice []string, element string) int

PosString returns the first index of element in slice. If slice does not contain element, returns -1.

func RandomString added in v1.14.0

func RandomString(length int) string

RandomString creates a random string with a set length

func RemoveItemFromSlice added in v1.16.0

func RemoveItemFromSlice(slice []string, item string) []string

RemoveItemFromSlice returns a slice with item removed If the item does not exist, the slice is unchanged This is quite slow in the scheme of things, so shouldn't be used without examination

Types

This section is empty.

Jump to

Keyboard shortcuts

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