Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectoryGetter ¶
DirectoryGetter wraps a few operating sytem specific methods.
type ExeDirGetter ¶
type ExeDirGetter struct{}
ExeDirGetter implements the DirectoryGetter interface.
func (*ExeDirGetter) CurrentDirectory ¶
func (e *ExeDirGetter) CurrentDirectory() (string, error)
CurrentDirectory returns the absolute full directory path of the currently running executable.
func (*ExeDirGetter) GetOS ¶
func (e *ExeDirGetter) GetOS() string
Get OS returns the current operating system as a string. There should be three: "linux", "darwin", and "windows".
type FilepathBuilder ¶
type FilepathBuilder struct {
// contains filtered or unexported fields
}
FilepathBuilder encapsulates the data and functionality to build the full versioned kubectl filepath from the server version.
func NewFilepathBuilder ¶
func NewFilepathBuilder(dirGetter DirectoryGetter, filestat func(string) (os.FileInfo, error)) *FilepathBuilder
NewFilepathBuilder encapsulates information necessary to build the full file path of the versioned kubectl binary to execute.
func (*FilepathBuilder) ValidateFilepath ¶
func (c *FilepathBuilder) ValidateFilepath(filepath string) error
func (*FilepathBuilder) VersionedFilePath ¶
func (c *FilepathBuilder) VersionedFilePath(version version.Info) (string, error)
VersionedFilePath returns the full absolute file path to the versioned kubectl binary to dispatch to. On error, empty string is returned.