Documentation
¶
Index ¶
- func CheckDirExist(dir string) bool
- func CheckFileExist(file string) bool
- func ConvertExecutableExt(fpath string) string
- func CreateDirIfNotExist(dir string)
- func DownloadFromURL(installLocation string, url string) (string, error)
- func GetTFList(mirrorURL string, preRelease bool) ([]string, error)
- func GetTFURLBody(mirrorURL string) ([]string, error)
- func HTTPClient() *http.Client
- func Install(tfversion string, mirrorURL string) (string, error)
- func InstallTFProvidedModule(dir string, mirrorURL string) (string, error)
- func Path(value string) string
- func RemoveFiles(src string)
- func RenameFile(src string, dest string)
- func RunTerraform(tfBinaryPath string, args ...string) int
- func Unzip(src string, dest string) error
- func ValidVersionFormat(version string) bool
- func WaitForLockFile() (unlock func())
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDirExist ¶
CheckDirExist : check if directory exist dir=path to file return bool
func CheckFileExist ¶
CheckFileExist : check if file exist in directory
func ConvertExecutableExt ¶
ConvertExecutableExt : convert excutable with local OS extension
func CreateDirIfNotExist ¶
func CreateDirIfNotExist(dir string)
CreateDirIfNotExist : create directory if directory does not exist
func DownloadFromURL ¶
DownloadFromURL : Downloads the binary from the source url
func GetTFURLBody ¶
GetTFURLBody : Get list of terraform versions from hashicorp releases
func HTTPClient ¶
func InstallTFProvidedModule ¶
install when tf file is provided
func RunTerraform ¶
func Unzip ¶
Unzip will decompress a zip archive, moving all files and folders within the zip file (parameter 1) to an output directory (parameter 2).
func ValidVersionFormat ¶
ValidVersionFormat : returns valid version format
For example: 0.1.2 = valid
// For example: 0.1.2-beta1 = valid // For example: 0.1.2-alpha = valid // For example: a.1.2 = invalid // For example: 0.1. 2 = invalid
func WaitForLockFile ¶
func WaitForLockFile() (unlock func())
Types ¶
This section is empty.