Documentation ¶
Overview ¶
DBDeployer - The MySQL Sandbox Copyright © 2006-2020 Giuseppe Maxia
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func AbsolutePath(value string) (string, error)
- func AddToCleanupStack(cf CleanupFunc, funcName, arg string)
- func AppendStrings(lines []string, filename string, termination string) error
- func Atoi(val string) int
- func BaseName(filename string) string
- func BeginsWith(s, expr string) bool
- func CheckFlavorSupport(flavor string) error
- func CheckLibraries(basedir string) error
- func CheckOrigin(args []string)
- func CheckPrerequisites(label string, neededExecutables []string) error
- func CheckSandboxDir(sandboxHome string) error
- func CheckTarballOperatingSystem(basedir string) error
- func Coalesce(items ...interface{}) interface{}
- func CoalesceString(items ...string) string
- func CondPrintf(format string, args ...interface{})
- func CondPrintln(args ...interface{})
- func CopyFile(source, destination string) error
- func DetectBinaryFlavor(basedir string) string
- func DetectTarballFlavor(tarballName string) string
- func DirExists(filename string) bool
- func DirName(filename string) string
- func EndsWith(s, expr string) bool
- func ErrCheckExitf(err error, exitCode int, format string, args ...interface{})
- func ExecExists(filename string) bool
- func Exit(exitCode int, messages ...string)
- func Exitf(exitCode int, format string, args ...interface{})
- func FileExists(filename string) bool
- func FindFreePort(basePort int, installedPorts []int, howMany int) (int, error)
- func FindInPath(filename string) string
- func FindTarballInfo(fileName string) (flavor, version, shortVersion string, err error)
- func GetAvailableVersions() ([]string, error)
- func GetBashPath(wantedValue string) (string, error)
- func GetCompatibleClientVersion(basedir, serverVersion string) (string, error)
- func GetEarliestVersion(sandboxBinary string, wantedVersion, flavor string) string
- func GetFileChecksum(fileName, crcType string) (string, error)
- func GetFileMd5(fileName string) (string, error)
- func GetFileSha1(fileName string) (string, error)
- func GetFileSha256(fileName string) (string, error)
- func GetFileSha512(fileName string) (string, error)
- func GetFlavoredVersionsFromDir(basedir, flavor string) []string
- func GetInstalledPorts(sandboxHome string) ([]int, error)
- func GetLatestVersion(sandboxBinary string, wantedVersion, flavor string) string
- func GetRegexNamedGroups(text string, expression *regexp.Regexp) (map[string]string, error)
- func GetRegexPositionalGroups(text string, expression *regexp.Regexp) ([]string, error)
- func GetVarsFromTemplate(tmpl string) []string
- func GetVersionsFromDir(basedir string) ([]string, error)
- func GlobalTempDir() string
- func GreaterOrEqualVersion(version string, comparedTo []int) (bool, error)
- func GreaterOrEqualVersionList(verList, comparedTo []int) (bool, error)
- func HasCapability(flavor, feature, version string) (bool, error)
- func Includes(mainString, contained string) bool
- func IntSliceToDottedString(val []int) string
- func IntSliceToSeparatedString(val []int, separator string) string
- func IsATarball(fileName string) bool
- func IsCompatibleVersion(versionStr string) bool
- func IsEmptyOrBlank(s string) bool
- func IsEnvSet(envVar string) bool
- func IsIPV4(ip string) bool
- func IsUrl(s string) bool
- func IsVersion(version string) bool
- func LatestVersion(searchDir, pattern string) string
- func LogDirName() string
- func MakeCustomizedUuid(port, nodeNum int) (string, error)
- func Matches(s string, expr string) bool
- func Mkdir(dirName string)
- func OptionCompare(option, value string) bool
- func OptionComponents(s string) (value string, negation bool)
- func RemoveTrailingSlash(s string) string
- func ReplaceEnvVar(name string, envVar string) string
- func ReplaceHomeVar(path string) string
- func ReplaceLiteralEnvVar(name string, envVar string) string
- func ReplaceLiteralHome(path string) string
- func Rmdir(dirName string)
- func RmdirAll(dirName string)
- func RunCleanupActions()
- func RunCmd(c string) (string, error)
- func RunCmdCtrl(c string, silent bool) (string, error)
- func RunCmdCtrlWithArgs(c string, args []string, silent bool) (string, error)
- func RunCmdWithArgs(c string, args []string) (string, error)
- func SafeTemplateFill(template_name, tmpl string, data StringMap) (string, error)
- func SandboxInfoToFileNames(sbList []SandboxInfo) (fileNames []string)
- func SlurpAsBytes(filename string) ([]byte, error)
- func SlurpAsLines(filename string) ([]string, error)
- func SlurpAsString(filename string) (string, error)
- func SortVersions(versions []string) []string
- func SortVersionsSubset(versions []string, wanted string) (sorted []string)
- func StringToIntSlice(val string) (numberList []int, err error)
- func TemplateFill(tmpl string, data StringMap) string
- func TextToBool(value string) (result bool)
- func TrimmedLines(s string) string
- func VersionToList(version string) ([]int, error)
- func VersionToName(version string) string
- func VersionToPort(version string) (int, error)
- func Which(filename string) string
- func WriteSandboxDescription(destination string, sd SandboxDescription) error
- func WriteString(line string, filename string) error
- func WriteStrings(lines []string, filename string, termination string) error
- type Capabilities
- type Capability
- type CleanupFunc
- type CleanupRec
- type ConfigOptions
- type FeatureList
- type KeyValue
- type PortMap
- type SandboxDescription
- type SandboxInfo
- type SandboxInfoList
- type SandboxUser
- type Stack
- type StringMap
- type VersionInfo
Constants ¶
const ( // Tarball flavors MySQLFlavor = "mysql" MySQLShellFlavor = "mysql-shell" PerconaServerFlavor = "percona" MariaDbFlavor = "mariadb" NdbFlavor = "ndb" PxcFlavor = "pxc" TiDbFlavor = "tidb" // Feature names InstallDb = "installdb" DynVariables = "dynVars" SemiSynch = "semiSync" CrashSafe = "crashSafe" GTID = "GTID" EnhancedGTID = "enhancedGTID" Initialize = "initialize" CreateUser = "createUser" SuperReadOnly = "superReadOnly" MySQLX = "mysqlx" MySQLXDefault = "mysqlxDefault" MultiSource = "multiSource" GroupReplication = "groupReplication" SetPersist = "setPersist" Roles = "roles" NativeAuth = "nativeAuth" DataDict = "datadict" UpgradeWithTool = "upgrade_with_tool" UpgradeWithServer = "upgrade_with_server" XtradbCluster = "xtradbCluster" XtradbClusterNoSlaveUpdates = "xtradbCluster_no_slave_updates" XtradbClusterEncryptCluster = "xtradbCluster_encrypt_cluster" XtradbClusterRsync = "xtradb_cluster_rsync" XtradbClusterXtrabackup = "xtradb_cluster_xtrabackup" NdbCluster = "ndbCluster" RootAuth = "rootAuth" AdminAddress = "adminAddress" EmbedMySQLShell = "embed-mysql-shell" CloneServer = "clone-server" )
Variables ¶
var AllCapabilities = map[string]Capabilities{ MySQLFlavor: MySQLCapabilities, PerconaServerFlavor: PerconaCapabilities, MariaDbFlavor: MariadbCapabilities, TiDbFlavor: TiDBCapabilities, NdbFlavor: NdbCapabilities, PxcFlavor: PxcCapabilities, MySQLShellFlavor: MySQLShellCapabilities, }
var CommandLineArgs []string
var CompatibleVersion string = "1.53.0" // 2020-07-19
Compatible version is the version used to mark compatible archives (templates, configuration). It is usually major.minor.0, except when we are at version 0.x, when every revision may bring incompatibility
var FlavorCompositionList = []flavorIndicator{ { AllNeeded: true, // contains filtered or unexported fields }, { AllNeeded: true, // contains filtered or unexported fields }, { AllNeeded: true, // contains filtered or unexported fields }, { AllNeeded: true, // contains filtered or unexported fields }, { AllNeeded: false, // contains filtered or unexported fields }, { AllNeeded: false, // contains filtered or unexported fields }, { AllNeeded: false, // contains filtered or unexported fields }, { AllNeeded: false, // contains filtered or unexported fields }, { AllNeeded: true, // contains filtered or unexported fields }, }
Flavor indicators must be listed from the most complex ones to the simplest ones, because we want to catch the flavors that require multiple elements to be identified. If we put the simpler ones on top, we would miss the complex ones.
var MariadbCapabilities = Capabilities{ Flavor: MariaDbFlavor, Features: FeatureList{ InstallDb: { Description: "uses mysql_install_db", Since: globals.MinimumMySQLInstallDb, Until: nil, }, RootAuth: { Description: "Root Authentication during install", Since: globals.MinimumRootAuthVersion, }, DynVariables: MySQLCapabilities.Features[DynVariables], SemiSynch: MySQLCapabilities.Features[SemiSynch], }, }
NOTE: We only list the capabilities for which dbdeployer needs to take action
var MySQLCapabilities = Capabilities{ Flavor: MySQLFlavor, Description: "MySQL server", Features: FeatureList{ InstallDb: { Description: "uses mysql_install_db", Since: globals.MinimumMySQLInstallDb, Until: globals.MaximumMySQLInstallDb, }, DynVariables: { Description: "dynamic variables", Since: globals.MinimumDynVariablesVersion, }, SemiSynch: { Description: "semi-synchronous replication", Since: globals.MinimumSemiSyncVersion, }, CrashSafe: { Description: "crash-safe replication", Since: globals.MinimumCrashSafeVersion, }, GTID: { Description: "Global transaction identifiers", Since: globals.MinimumGtidVersion, }, EnhancedGTID: { Description: "Enhanced Global transaction identifiers", Since: globals.MinimumEnhancedGtidVersion, }, Initialize: { Description: "mysqld --initialize as default", Since: globals.MinimumDefaultInitializeVersion, }, CreateUser: { Description: "Create user mandatory", Since: globals.MinimumCreateUserVersion, }, SuperReadOnly: { Description: "super-read-only support", Since: globals.MinimumSuperReadOnly, }, MySQLX: { Description: "MySQLX supported", Since: globals.MinimumMysqlxVersion, }, MySQLXDefault: { Description: "MySQLX enabled by default", Since: globals.MinimumMysqlxDefaultVersion, }, MultiSource: { Description: "multi-source replication", Since: globals.MinimumMultiSourceReplVersion, }, GroupReplication: { Description: "group replication", Since: globals.MinimumGroupReplVersion, }, SetPersist: { Description: "Set persist supported", Since: globals.MinimumPersistVersion, }, Roles: { Description: "Roles supported", Since: globals.MinimumRolesVersion, }, NativeAuth: { Description: "Native Authentication plugin", Since: globals.MinimumNativeAuthPluginVersion, }, DataDict: { Description: "data dictionary", Since: globals.MinimumDataDictionaryVersion, }, AdminAddress: { Description: "Connection through admin address", Since: globals.MinimumAdminAddressVersion, }, UpgradeWithTool: { Description: "upgrade using mysql_upgrade tool", Since: globals.MinimumMySQLUpgradeTool, Until: globals.MaximumMySQLUpgradeTool, }, UpgradeWithServer: { Description: "upgrade using mysqld server", Since: globals.MinimumMySQLUpgradeServer, }, CloneServer: { Description: "clone MySQL server", Since: globals.MinimumCloneMySQLServer, }, }, }
var MySQLShellCapabilities = Capabilities{ Flavor: MySQLShellFlavor, Features: FeatureList{ EmbedMySQLShell: { Description: "Can embed mysql-shell into server tree", Since: globals.MinimumMySQLShellEmbed, Until: nil, }, }, }
var NdbCapabilities = Capabilities{ Flavor: NdbFlavor, Description: "MySQL NDB Cluster", Features: FeatureList{ CreateUser: MySQLCapabilities.Features[CreateUser], DataDict: MySQLCapabilities.Features[DataDict], DynVariables: MySQLCapabilities.Features[DynVariables], InstallDb: { Description: "uses mysql_install_db", Since: globals.MinimumNdbInstallDb, Until: globals.MaximumNdbInstallDb, }, Initialize: { Description: "uses mysqld initialize", Since: globals.MinimumNdbInitialize, }, MySQLXDefault: MySQLCapabilities.Features[MySQLXDefault], Roles: MySQLCapabilities.Features[Roles], SetPersist: MySQLCapabilities.Features[SetPersist], NdbCluster: { Description: "MySQL NDB Cluster", Since: globals.MinimumNdbClusterVersion, }, }, }
var PerconaCapabilities = Capabilities{ Flavor: PerconaServerFlavor, Description: "Percona Server", Features: MySQLCapabilities.Features, }
var PxcCapabilities = Capabilities{ Flavor: PxcFlavor, Description: "Percona XtraDB Cluster", Features: addCapabilities(PerconaCapabilities.Features, FeatureList{ XtradbCluster: { Description: "XtraDB Cluster creation", Since: globals.MinimumXtradbClusterVersion, }, XtradbClusterNoSlaveUpdates: { Description: "XtraDB Cluster creation without log_slave_updates", Since: globals.MinimumXtradbClusterNoSlaveUpdatesVersion, }, XtradbClusterEncryptCluster: { Description: "XtraDB Cluster creation with cluster encryption", Since: globals.MinimumXtradbClusterNoSlaveUpdatesVersion, }, XtradbClusterRsync: { Description: "XtraDB Cluster SST method using rsync", Since: globals.MinimumXtradbClusterRsync, Until: globals.MaximumXtradbClusterRsync, }, XtradbClusterXtrabackup: { Description: "XtraDB Cluster SST method using XtraBackup", Since: globals.MinimumXtradbClusterXtraBackup, }, }), }
var TiDBCapabilities = Capabilities{ Flavor: TiDbFlavor, Description: "TiDB isolated server", Features: FeatureList{}, }
var VersionDef string = "1.53.0" // 2020-07-19
Functions ¶
func AbsolutePath ¶
Returns the absolute path of a file
func AddToCleanupStack ¶
func AddToCleanupStack(cf CleanupFunc, funcName, arg string)
Adds an action to the list of clean-up operations to run before aborting the program
func AppendStrings ¶
append a string slice into an existing file
func BeginsWith ¶ added in v1.52.0
func CheckFlavorSupport ¶ added in v1.19.0
func CheckLibraries ¶ added in v1.40.0
func CheckOrigin ¶
func CheckOrigin(args []string)
Checks the initial argument for a sandbox deployment
func CheckPrerequisites ¶ added in v1.21.0
func CheckSandboxDir ¶
Creates a sandbox directory if it does not exist
func CheckTarballOperatingSystem ¶
Checks that the extracted tarball directory
contains one or more files expected for the current operating system. It prevents simple errors like : * using a Linux tarball on a Mac or vice-versa * using a source or test tarball instead of a binaries one.
func Coalesce ¶ added in v1.32.0
func Coalesce(items ...interface{}) interface{}
Coalesce returns the first object that is not empty
func CoalesceString ¶ added in v1.32.0
CoalesceString returns the first string that it is not empty or an empty string if all items are empty
func CondPrintf ¶
func CondPrintf(format string, args ...interface{})
func CondPrintln ¶
func CondPrintln(args ...interface{})
func DetectBinaryFlavor ¶ added in v1.19.0
Tries to detect the database flavor from files in the tarball directory
func DetectTarballFlavor ¶ added in v1.44.0
Tries to detect the database flavor from tarball name
func ErrCheckExitf ¶
Checks the status of error variable and exit with custom message if it is not nil.
func FindFreePort ¶
Finds the a range of howMany free ports available, starting at basePort. installedPorts is a slice of ports already used by other sandboxes. Calls either findFreePortRange or findFreePortSingle, depending on the amount of ports requested. Returns the first port of the requested range
func FindTarballInfo ¶ added in v1.44.0
func GetAvailableVersions ¶
func GetBashPath ¶ added in v1.32.0
func GetCompatibleClientVersion ¶ added in v1.39.0
func GetEarliestVersion ¶ added in v1.39.0
func GetFileChecksum ¶ added in v1.34.0
Get a file checksum, choosing among MD5, SH1, SHA256, and SHA512
func GetFileMd5 ¶ added in v1.34.0
func GetFileSha1 ¶ added in v1.34.0
func GetFileSha256 ¶ added in v1.34.0
func GetFileSha512 ¶ added in v1.34.0
func GetFlavoredVersionsFromDir ¶ added in v1.24.0
Returns the list of versions of a given flavor, or an empty list if no versions were available for that flavor
func GetInstalledPorts ¶
Collects a list of used ports from deployed sandboxes
func GetLatestVersion ¶ added in v1.39.0
func GetRegexNamedGroups ¶ added in v1.52.0
func GetRegexPositionalGroups ¶ added in v1.52.0
func GetVarsFromTemplate ¶ added in v1.24.0
Gets a list of all variables mentioned in a template
func GetVersionsFromDir ¶
Returns the list of versions available for deployment
func GlobalTempDir ¶ added in v1.30.0
func GlobalTempDir() string
func GreaterOrEqualVersion ¶
Checks if a version string is greater or equal a given numeric version "5.6.33" >= []int{5,7,0} = false "5.7.21" >= []int{5,7,0} = true "10.1.21" >= []int{5,7,0} = false (!) Note: MariaDB versions are skipped. The function returns false for MariaDB 10+. So far (2018-02-19) this comparison holds, because MariaDB behaves like 5.5+ for the purposes of sandbox deployment
DEPRECATED as of 1.18.0 Use GreaterOrEqualVersionList and flavors instead
func GreaterOrEqualVersionList ¶ added in v1.19.0
func HasCapability ¶ added in v1.19.0
Returns true if a given flavor and version support the wanted feature
func IntSliceToDottedString ¶
Given an array of integers, returns a string containing the numbers separated by a dot. For example: an input of []int{1, 2, 3} returns "1.2.3"
func IntSliceToSeparatedString ¶ added in v1.41.0
Given an array of integers, returns a string containing the numbers separated by a given string. For example: an input of []int{1, 2, 3}, "#" returns "1#2#3"
func IsATarball ¶
Returns true if the file name has a recognized tarball extension for use with dbdeployer
func IsCompatibleVersion ¶ added in v1.31.0
Checks whether a version string is equal or greater than the current compatible version
func IsEmptyOrBlank ¶ added in v1.32.0
IsEmptyOrBlank returns true if the given string is empty or contains only spaces It also returns true for a string that contains spaces AND A NEWLINE empty: "" empty with newline: "\n" only spaces: " " spaces and tabs: " \t" spaces and newline: " \n"
func LatestVersion ¶
Returns the latest version among the ones found in a Sandbox binary directory
func MakeCustomizedUuid ¶
Creates a "human readable" and predictable UUID using some pre-defined elements. Used to replace the random UUID created by MySQL 5.6+, with the purpose of returning easy to read server identifiers that can be processed visually.
func OptionCompare ¶ added in v1.44.0
func OptionComponents ¶ added in v1.44.0
func RemoveTrailingSlash ¶
Removes a slash (if any) at the end of a given string
func ReplaceEnvVar ¶
Replaces the environment variable `envVar` with its value for example, if "$HOME" resolves to "/home/goofy" the string "$HOME/some/path" would become "/home/goofy/some/path"
func ReplaceHomeVar ¶
Given a path with the variable "$HOME" at the start, returns a string with the value of HOME expanded
func ReplaceLiteralEnvVar ¶
Replaces the literal value of an environment variable with its name for example, if "$HOME" resolves to "/home/goofy" the string "/home/goofy/some/path" would become "$HOME/some/path"
func ReplaceLiteralHome ¶
Given a path starting at the HOME directory returns a string where the literal value for $HOME is replaced by the string "$HOME"
func RmdirAll ¶
func RmdirAll(dirName string)
Removes a directory with its contents, and exits if an error occurs
func RunCmdCtrl ¶
Runs a command, with optional quiet output
func RunCmdCtrlWithArgs ¶ added in v1.32.0
Runs a command with arguments and output suppression
func RunCmdWithArgs ¶
Runs a command with arguments
func SafeTemplateFill ¶ added in v1.23.0
SafeTemplateFill passed template string is formatted using its operands and returns the resulting string. It checks that the data was safely initialized
func SandboxInfoToFileNames ¶
func SandboxInfoToFileNames(sbList []SandboxInfo) (fileNames []string)
Returns a list of inner sandboxes
func SlurpAsBytes ¶
reads a file and returns its contents as a byte slice
func SlurpAsLines ¶
Reads a file and returns its lines as a string slice
func SlurpAsString ¶
Reads a file and returns its contents as a single string
func SortVersions ¶
func SortVersionsSubset ¶
Given a list of version strings (in the format x.x.x) this function returns an ordered list, taking into account the components of the versions, so that 5.6.2 sorts lower than 5.6.11 while a text sort would put 5.6.11 before 5.6.2 If wanted is not empty, it will be interpreted as a short version to match. For example, when wanted is "5.6", only the versions starting with '5.6' will be considered.
func StringToIntSlice ¶
Given a string containing comma-separated integers, returns an array of integers Example: an input of "1,2,3" returns []int{1, 2, 3}
func TemplateFill ¶
TemplateFill passed template string is formatted using its operands and returns the resulting string. Spaces are added between operands when neither is a string. Based on code from https://play.golang.org/p/COHKlB2RML DEPRECATED: replaced by SafeTemplateFill
func TextToBool ¶
Returns true if the input value is either of "true", "yes", "1"
func TrimmedLines ¶
Given a multi-line string, this function removes leading spaces from every line. It also removes the first line, if it is empty
func VersionToList ¶
Gets three integers for a version string Converts "1.2.3" into []int{1, 2, 3}
func VersionToName ¶
Converts a version string into a name. Replaces dots with underscores. "1.2.3" -> "1_2_3"
func VersionToPort ¶
Converts a version string into a port number e.g. "5.6.33" -> 5633
func Which ¶
Returns the full path of an executable, or an empty string if the executable is not found
func WriteSandboxDescription ¶
func WriteSandboxDescription(destination string, sd SandboxDescription) error
Writes the description of a sandbox in the appropriate directory
func WriteString ¶
append a string into an existing file
Types ¶
type Capabilities ¶ added in v1.19.0
type Capabilities struct { Flavor string `json:"flavor"` Description string `json:"description"` Features FeatureList `json:"features"` }
Capabilities holds the broad definition of a feature set for a flavor
type Capability ¶ added in v1.19.0
type Capability struct { Description string `json:"description"` Since globals.NumericVersion `json:"since"` Until globals.NumericVersion `json:"until"` }
Capability defines a feature availability
type CleanupFunc ¶
type CleanupFunc func(target string)
type CleanupRec ¶
type CleanupRec struct {
// contains filtered or unexported fields
}
type ConfigOptions ¶
func ParseConfigFile ¶
func ParseConfigFile(filename string) (ConfigOptions, error)
Reads a MySQL configuration file and returns its structured contents
type FeatureList ¶ added in v1.19.0
type FeatureList map[string]Capability
FeatureList is the set of capabilities for a given flavor
type SandboxDescription ¶
type SandboxDescription struct { Basedir string `json:"basedir"` ClientBasedir string `json:"client_basedir,omitempty"` SBType string `json:"type"` // single multi master-slave group Version string `json:"version"` Flavor string `json:"flavor,omitempty"` Host string `json:"host,omitempty"` Port []int `json:"port"` Nodes int `json:"nodes"` NodeNum int `json:"node_num"` DbDeployerVersion string `json:"dbdeployer-version"` Timestamp string `json:"timestamp"` CommandLine string `json:"command-line"` LogFile string `json:"log-file,omitempty"` }
func ReadSandboxDescription ¶
func ReadSandboxDescription(sandboxDirectory string) (SandboxDescription, error)
Reads sandbox description from a given directory
type SandboxInfo ¶
type SandboxInfo struct { SandboxName string SandboxDesc SandboxDescription Locked bool }
func FindSandbox ¶ added in v1.44.0
func FindSandbox(sandboxList []SandboxInfo, wanted string) (SandboxInfo, error)
FindSandbox will find a wanted sandbox from a list of sandboxes It will get the sandbox by name, if it matches. If not, it will try to match by version, port, type, or flavor, provided that the wanted parameter is unique among the sandboxes. For example, if we ask for version 8.0.19 and only one sandbox uses such version, we return a match. If two or more sandboxes use that version, there is no match. The same applies for the other criteria.
FOR FUTURE USAGE with `dbdeployer delete` or `dbdeployer run sandboxIdentifier`
type SandboxInfoList ¶ added in v1.53.0
type SandboxInfoList []SandboxInfo
func GetFullSandboxInfo ¶ added in v1.53.0
func GetFullSandboxInfo(sandboxHome string) SandboxInfoList
func GetInstalledSandboxes ¶
func GetInstalledSandboxes(sandboxHome string) (installedSandboxes SandboxInfoList, err error)
Gets a list of installed sandboxes from the $SANDBOX_HOME directory
func GetSandboxesByDate ¶ added in v1.53.0
func GetSandboxesByDate(sandboxHome string) (SandboxInfoList, error)
type SandboxUser ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
The stack is implemented using a double-linked list from Go standard library
func (*Stack) Bottom ¶
func (stack *Stack) Bottom() interface{}
Bottom() returns the object stored as .Value in the bottom list element The object is NOT removed from the list
func (*Stack) Pop ¶
func (stack *Stack) Pop() interface{}
Pop() returns the object stored as .Value in the top list element Client calls will need to cast the object to the expected type. The object is removed from the list e.g.:
type MyType struct { ... } var lastOne MyType lastOne = stack.Pop().(MyType)
type StringMap ¶
type StringMap map[string]interface{}
StringMap defines the map of variable types, for brevity
type VersionInfo ¶ added in v1.28.0
func GetVersionInfoFromDir ¶ added in v1.28.0
func GetVersionInfoFromDir(basedir string) []VersionInfo