Documentation ¶
Index ¶
- Constants
- func BuildKubectlNameForLocalBin(v semver.Version) string
- func BuildKubectlNameForSystemBin(version semver.Version) string
- func HomeDir() string
- func HomeDirEnvKey() string
- func IsNoVersionFound(err error) bool
- func IsShaMismatch(err error) bool
- func LocalDownloadDir() string
- type NoVersionFoundError
- type ShaMismatchError
Constants ¶
const KubectlLocalNamingScheme = "kubectl%d.%d.%d"
KubectlLocalNamingScheme holds the scheme used to name the kubectl binaries downloaded by kuberlr
const KubectlSystemNamingScheme = "kubectl%d.%d"
KubectlSystemNamingScheme holds the scheme used to name the kubectl binaries installed system-wide
const SystemPath = "/usr/bin"
SystemPath contains the default path to look for kubectl binaries installed system-wide
Variables ¶
This section is empty.
Functions ¶
func BuildKubectlNameForLocalBin ¶ added in v0.2.0
func BuildKubectlNameForLocalBin(v semver.Version) string
BuildKubectlNameForLocalBin returns how kuberlr will name the kubectl binary with the specified version when downloading that to the user home
func BuildKubectlNameForSystemBin ¶ added in v0.2.0
func BuildKubectlNameForSystemBin(version semver.Version) string
BuildKubectlNameForSystemBin returns how kuberlr expects system-wide kubectl binaries to be named
func HomeDirEnvKey ¶ added in v0.1.0
func HomeDirEnvKey() string
HomeDirEnvKey returns the name of the environment variable that holds the name of the user home directory
func IsNoVersionFound ¶ added in v0.2.0
IsNoVersionFound returns true when the given error is of type NoVersionFoundError
func IsShaMismatch ¶ added in v0.3.2
IsShaMismatch returns true when the given error is of type ShaMismatchError
func LocalDownloadDir ¶ added in v0.2.0
func LocalDownloadDir() string
LocalDownloadDir return the path to where kuberlr saves the kubectl binaries downloaded from kubernetes' upstream mirror
Types ¶
type NoVersionFoundError ¶ added in v0.2.0
type NoVersionFoundError struct {
Err error
}
NoVersionFoundError error is raised when no kubectl binary has yet been downloaded by kuberlr
func (*NoVersionFoundError) Error ¶ added in v0.2.0
func (e *NoVersionFoundError) Error() string
Error returns a human description of the error
type ShaMismatchError ¶ added in v0.3.2
ShaMismatchError error is raised when the downloaded kubectl's SHA doesn't match the recorded SHA
func (*ShaMismatchError) Error ¶ added in v0.3.2
func (e *ShaMismatchError) Error() string
Error returns a human description of the error