# Functions
Returns the absolute path of a file.
Adds an action to the list of clean-up operations to run before aborting the program.
append a string slice into an existing file.
Converts a string to an integer.
Returns the base name of a file.
BeginsWith returns true when a given expression is found at the start of the input string Unlike `strings.HasPrefix`, the expression can be a regular expression rather than a fixed string.
No description provided by the author
No description provided by the author
Checks the initial argument for a sandbox deployment.
No description provided by the author
Creates a sandbox directory if it does not exist.
Checks that the extracted tarball directory
contains one or more files expected for the current
operating system.
Coalesce returns the first object that is not empty.
CoalesceString returns the first string that it is not empty or an empty string if all items are empty.
No description provided by the author
No description provided by the author
Copies a file.
Tries to detect the database flavor from files in the tarball directory.
Tries to detect the database flavor from tarball name.
returns true if a given directory exists.
Returns the directory name of a file.
EndsWith returns true when a given expression is found at the end of the input string Unlike `strings.HasSuffix`, the expression can be a regular expression rather than a fixed string.
Checks the status of error variable and exit with custom message if it is not nil.
returns true if a given executable exists.
Exit with custom set of messages Runs cleanup actions before aborting the program.
Exit with formatted message Runs cleanup actions before aborting the program.
returns true if a given file exists.
Finds the a range of howMany free ports available, starting at basePort.
Same as Which.
FindSandbox will find a wanted sandbox from a list of sandboxes It will get the sandbox by name, if it matches.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Get a file checksum, choosing among MD5, SH1, SHA256, and SHA512.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Returns the list of versions of a given flavor, or an empty list if no versions were available for that flavor.
No description provided by the author
Collects a list of used ports from deployed sandboxes.
Gets a list of installed sandboxes from the $SANDBOX_HOME directory.
No description provided by the author
GetRegexNamedGroups returns the strings captured by a regular expression with named groups It returns an error when no named groups were in the regular expression It returns nil when the expression did not match.
GetRegexPositionalGroups returns the strings captured by a regular expression with positional groups It returns an error when named groups were in the regular expression It returns nil when the expression did not match.
No description provided by the author
Gets a list of all variables mentioned in a template.
No description provided by the author
Returns the list of versions available for deployment.
No description provided by the author
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.
No description provided by the author
Returns true if a given flavor and version support the wanted feature.
Return true is `contained` is a sub-string of `mainString`.
Given an array of integers, returns a string containing the numbers separated by a dot.
Given an array of integers, returns a string containing the numbers separated by a given string.
Returns true if the file name has a recognized tarball extension for use with dbdeployer.
Checks whether a version string is equal or greater than the current compatible version.
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".
Checks whether a given environment variable is set.
Returns true if a given string looks like an IPV4.
Return true if a given string is a valid URL.
Returns true if a given string looks contains a version number (major.minor.rev).
Returns the latest version among the ones found in a Sandbox binary directory.
Returns the name of the log directory.
Creates a "human readable" and predictable UUID using some pre-defined elements.
Matches returns true when a given expression matches the input string.
Creates a directory, and exits if an error occurs.
NewStack returns a new stack.
No description provided by the author
No description provided by the author
Reads a MySQL configuration file and returns its structured contents.
Reads sandbox description from a given directory.
No description provided by the author
Removes a slash (if any) at the end of a given string.
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".
Given a path with the variable "$HOME" at the start, returns a string with the value of HOME expanded.
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".
Given a path starting at the HOME directory returns a string where the literal value for $HOME is replaced by the string "$HOME".
Removes a directory, and exits if an error occurs.
RmDirAll removes a directory with its contents, and exits if an error occurs Checks that the directory does not contain $HOME or $PWD.
Runs the cleanup actions (usually before Exit).
Runs a command.
Runs a command, with optional quiet output.
Runs a command with arguments and output suppression.
Runs a command with arguments.
SafeTemplateFill passed template string is formatted using its operands and returns the resulting string.
Returns a list of inner sandboxes.
reads a file and returns its contents as a byte slice.
Reads a file and returns its lines as a string slice.
Reads a file and returns its contents as a single string.
No description provided by the author
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.
Given a string containing comma-separated integers, returns an array of integers Example: an input of "1,2,3" returns []int{1, 2, 3}.
TemplateFill passed template string is formatted using its operands and returns the resulting string.
Returns true if the input value is either of "true", "yes", "1".
Given a multi-line string, this function removes leading spaces from every line.
Gets three integers for a version string Converts "1.2.3" into []int{1, 2, 3}.
Converts a version string into a name.
VersionToPort converts a version string into a port number e.g.
Returns the full path of an executable, or an empty string if the executable is not found.
Writes the description of a sandbox in the appropriate directory.
append a string into an existing file.
Writes a string slice into a file The file is created.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Feature names.
No description provided by the author
No description provided by the author
Tarball flavors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
CompatibleVersion is the version used to mark compatible archives (templates, configuration).
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.
NOTE: We only list the capabilities for which dbdeployer needs to take action.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
go:embed VERSION.
# Structs
Capabilities holds the broad definition of a feature set for a flavor.
Capability defines a feature availability.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The stack is implemented using a double-linked list from Go standard library.
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
FeatureList is the set of capabilities for a given flavor.
No description provided by the author
No description provided by the author
StringMap defines the map of variable types, for brevity.