Documentation ¶
Index ¶
- Constants
- Variables
- func AddRequiredBinary(binName string, deps []string) []string
- func BinaryShouldBeInstalled(d string) string
- func BinaryWithExtension(binary string) string
- func DownloadFile(clientURL string, fullPath string) error
- func FilterInstalledDependencies(deps []string) []string
- func InstallKubectl(skipPathScan bool) error
- func InstallKubectlWithVersion(version string, skipPathScan bool) error
- func InstallOrUpdateBinary(options InstallOrUpdateBinaryOptions) error
- func InstalledPackagesFile() (string, error)
- func IsBinaryWithProperVersionInstalled(binary string, expectedVersion string, versionExtractor VersionExtractor) (bool, error)
- func LoadInstalledPackages() (map[string]string, error)
- func LookupForBinary(binary string) (string, error)
- func RememberInstalledPackage(packageName string, version string) error
- func ShouldInstallBinary(name string) (bool, error)
- func UninstallBinary(binDir string, name string) error
- type InstallOrUpdateBinaryOptions
- type VersionExtractor
Constants ¶
const EksCtlVersion = "0.25.0"
EksCtlVersion binary version to use
const GlooVersion = "1.3.23"
GlooVersion binary version to use
const Helm2Version = "2.17.0"
Helm2Version binary version to use
const Helm3Version = "3.2.0"
Helm3Version binary version to use
const IBMCloudVersion = "0.10.1"
IBMCloudVersion ibm cloud binary version
const IamAuthenticatorAwsVersion = "1.12.7"
IamAuthenticatorAwsVersion authenticator binary version to use
const KubectlVersion = "1.16.5"
KubectlVersion binary version to use
const KustomizeVersion = "3.5.1"
KustomizeVersion binary version to use
Variables ¶
var GlobalBinaryPathAllowlist = []string{
"az",
"gcloud",
"oc",
"brew",
}
GlobalBinaryPathAllowlist binaries that require to be on the path but do not need to exist in JX_HOME/bin
Functions ¶
func AddRequiredBinary ¶
AddRequiredBinary add the required binary
func BinaryShouldBeInstalled ¶
BinaryShouldBeInstalled appends the binary to the deps array if it cannot be found on the $PATH
func BinaryWithExtension ¶
func DownloadFile ¶
DownloadFile downloads binary content of given URL into local filesystem.
func FilterInstalledDependencies ¶
FilterInstalledDependencies filters installed dependencies
func InstallKubectlWithVersion ¶
InstallKubectlWithVersion install a specific version of kubectl
func InstallOrUpdateBinary ¶
func InstallOrUpdateBinary(options InstallOrUpdateBinaryOptions) error
InstallOrUpdateBinary installs or updates a binary
func InstalledPackagesFile ¶
InstalledPackagesFile returns absolute path to binaries.yml file used to store version of installed packages.
func IsBinaryWithProperVersionInstalled ¶
func IsBinaryWithProperVersionInstalled(binary string, expectedVersion string, versionExtractor VersionExtractor) (bool, error)
func LoadInstalledPackages ¶
func LookupForBinary ¶
func RememberInstalledPackage ¶
RememberInstalledPackage writes the version of package into local file system. This allows to identify what version of package is currently installed in ~/.jx/bin .
func ShouldInstallBinary ¶
ShouldInstallBinary checks if the given binary should be installed
func UninstallBinary ¶
UninstallBinary uninstalls given binary
Types ¶
type InstallOrUpdateBinaryOptions ¶
type InstallOrUpdateBinaryOptions struct { Binary string GitHubOrganization string DownloadUrlTemplate string DownloadUrlTemplateLowerCase bool Version string SkipPathScan bool VersionExtractor VersionExtractor Archived bool ArchiveDirectory string }
InstallOrUpdateBinaryOptions options for install or update binary
type VersionExtractor ¶
type VersionExtractor interface {
// contains filtered or unexported methods
}