common

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerbosityOne
	VerbosityTwo
)
View Source
const KubectlLocalNamingScheme = "kubectl%d.%d.%d"

KubectlLocalNamingScheme holds the scheme used to name the kubectl binaries downloaded by kuberlr.

View Source
const KubectlSystemNamingScheme = "kubectl%d.%d"

KubectlSystemNamingScheme holds the scheme used to name the kubectl binaries installed system-wide.

View Source
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 HomeDir

func HomeDir() string

HomeDir returns current user home directory.

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

func IsNoVersionFound(err error) bool

IsNoVersionFound returns true when the given error is of type NoVersionFoundError.

func IsShaMismatch added in v0.3.2

func IsShaMismatch(err error) bool

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

type ShaMismatchError struct {
	URL         string
	ShaExpected string
	ShaActual   string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL