# Functions
AddSingleQuotes adds single quotes to each string in the given slice.
No description provided by the author
AppendSlices appends multiple slices into a single slice.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Cleans up a string by trimming \r and \n characters.
CleanupStrings cleans up a slice of strings by trimming \r and \n characters.
CombineSCPPath combines the given host and path into a single item for scp.
Command returns an exec.Cmd for the given command line.
containsIgnoreCase checks if the given string contains the specified substring, ignoring case.
ConvertInterfaceToMap converts a given value to a map[string]interface{}.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
E2EConvertIP maps an IP address to an E2E IP address.
E2EDocker checks if docker and docker-compose are available.
No description provided by the author
ExpandHome expands ~ symbol to home directory.
ExtractValueFromBytes extracts a value from a byte array using a regular expression.
FileCopy copies a file from src to dst.
FileExists checks if a file exists.
No description provided by the author
No description provided by the author
No description provided by the author
Formats an amount of base units as a string representing the amount in the given denomination.
GenDockerComposeFile generates a Docker Compose file with the specified number of nodes and Ubuntu version.
GenerateDockerHostIDs generates a list of Docker host IDs.
No description provided by the author
Context for ANR network operations.
Context for API requests.
Context for API requests with large timeout.
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
GetGitCommit takes a Git repository URL that contains commit ID and returns the commit ID Example: https://github.com/ava-labs/hypersdk/pull/772/commits/b88acfb370f5aeb83a000aece2d72f28154410a5 Should return b88acfb370f5aeb83a000aece2d72f28154410a5.
No description provided by the author
No description provided by the author
No description provided by the author
RemoteComposeFile returns the path to the remote docker-compose file.
GetRemoteComposeServicePath returns the path to the remote service directory.
GetRepoFromCommitURL takes a Git repository URL that contains commit ID and returns the cloneable Git Repo URL (ends in .git) and the repo directory name Example: https://github.com/ava-labs/hypersdk/pull/772/commits/b88acfb370f5aeb83a000aece2d72f28154410a5 Should return https://github.com/ava-labs/hypersdk.
GetSCPCommandString returns the SCP command string for the given source and destination paths.
GetSCPTargetPath returns the target path for the given source path and target directory.
No description provided by the author
GetSSHConnectionString returns the SSH connection string for the given public IP and certificate file path.
Get the host, port and path from a URL.
GetUserIPAddress retrieves the IP address of the user.
No description provided by the author
IsE2E checks if the environment variable "RUN_E2E" is set and returns true if it is, false otherwise.
IsExecutable checks if a file is executable.
isSSHAgentAvailable checks if the SSH agent is available.
No description provided by the author
IsSSHPubKey checks if the given string is a valid SSH public key.
IsUnsignedSlice returns true if all elements in the slice are unsigned integers.
No description provided by the author
IsValidURL checks if a URL is valid.
ListSSHAgentIdentity returns a list of SSH identities from ssh-agent.
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
RandomString generates a random string of the specified length.
ReadFile reads a file and returns the contents as a string.
ReadLongString reads a long string from the user input.
No description provided by the author
No description provided by the author
No description provided by the author
RetryFunction retries the given function until it succeeds or the maximum number of attempts is reached.
SaveDockerComposeFile saves the Docker Compose file with the specified number of nodes and Ubuntu version.
No description provided by the author
No description provided by the author
No description provided by the author
Size returns the size of a file or directory.
No description provided by the author
SplitComaSeparatedInt splits a comma-separated string into a slice of integers.
SplitComaSeparatedString splits and trims a comma-separated string into a slice of strings.
SplitKeyValueStringToMap splits a string with multiple key-value pairs separated by delimiter.
SplitSCPPath splits the given path into host and path.
SplitSliceAt splits a slice at the given index and returns two new slices.func SplitSliceAt[T any](slice []T, index int) ([]T, []T) {.
SplitString split string with a rune comma ignore quoted.
StartDockerCompose is a function that starts Docker Compose.
StopDockerCompose stops the Docker Compose services defined in the specified file.
StringValue returns the value of a key in a map as a string.
Sum calculates the sum of all the elements in the given slice of integers.
No description provided by the author
TimedFunction is a function that executes the given function `f` within a specified timeout duration.
TimedFunctionWithRetry is a function that executes the given function `f` within a specified timeout duration.
No description provided by the author
Unique returns a new slice containing only the unique elements from the input slice.
UserHomePath returns the absolute path of a file located in the user's home directory.
ValidateJSON takes a json string and returns it's byte representation if it contains valid JSON.
WriteStringToFile writes a string to a file.