General Functions#
HTTP Functions#
Function |
Description |
|---|---|
Executes a HTTP DELETE request |
|
Downloads a file with HTTP |
|
Executes a HTTP GET request |
|
Executes a HTTP HEAD request |
|
Executes a HTTP OPTIONS request |
|
Executes a HTTP PATCH request |
|
Executes a HTTP POST request |
|
Executes a HTTP PUT request |
|
Download a file in chunks (default 512kB). |
|
Generic http request function |
|
Uploads a file in chunks (default 512kB). |
Utility Functions#
Function |
Description |
|---|---|
Replacement for the column command, separator is tab. |
|
Shortcut to call jq. |
|
Shortcut to call jq, exits with 1 on null or false. |
|
Print Key/Value pairs |
|
Shortcut to call the mustache template engine. |
|
Shortcut for xargs, running the command sequentially and only with one parameter. |
|
Prints red error messages to STDERR. |
|
Prints green ok messages to STDOUT. |
|
Prints message only if VERBOSE is set to 1 |
|
Prints yellow warning messages to STDERR. |
|
Prints red error message in JSON format to STDERR. |
|
Prints red error message in JSON format to STDERR for curl. |
|
Prints green ok message in JSON format to STDOUT. |
|
Prints green ok message in JSON format to STDOUT for curl. |
|
Prints yellow warning message in JSON format to STDOUT. |
|
Prints yellow warning message in JSON format to STDOUT for curl. |
|
Check if first argument is in array (following arguments) |
|
Converts an array to a quoted string |
|
Asks for a secret string. |
|
Encodes string as Base64URL. |
|
Returns 1 if value is not a boolean |
|
Validates a value. |
|
Returns 1 if value is not a number |
|
Returns 1 if value is not a valid variable name |
|
Returns 1 if value is undefined, length is zero, contains only whitespaces or is null |
|
Validates a value. |
|
Returns 1 if value is not an unsigned integer |
|
Returns 1 if variable reference is undefined, length is zero, contains only whitespaces or is null |
|
Declares a variable KEY=VALUE |
|
Tries to resolve the staging variable. |
|
Get file size |
|
Checks for AES256: prefix of provided string. |
|
JSON validation, pipe string to stdin |
|
JSON encoding |
|
Convert string to lower case. |
|
Parses a command output. |
|
Sets the RESTSH_CURL_OPTIONS environment variable. |
|
Declares a variable from a file. .txt extension for simple variable, .array for array. |
|
Declares variables from a directory. .txt extension for simple variables, .array for arrays. |
|
Trim leading and trailing whitespaces. |
|
Convert string to upper case. |
|
URL encoding |
|
Decrypts a variable or fetches it from HashiCorp Vault. |
Vault Functions#
Function |
Description |
|---|---|
Get value from Vault |
|
Detects the Vault login method and tries to fetch a Vault token. |
|
Login into Vault with VAULT_ID_TOKEN |
|
Logout from Vault |