Documentation
¶
Index ¶
- type CommandExecutorHost
- func (h *CommandExecutorHost) AddSshHostKeyToKnownHosts(verbose bool) (err error)
- func (h *CommandExecutorHost) CheckFtpPortOpen(verbose bool) (err error)
- func (h *CommandExecutorHost) CheckReachable(verbose bool) (err error)
- func (c *CommandExecutorHost) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
- func (h *CommandExecutorHost) GetComment() (comment string, err error)
- func (c *CommandExecutorHost) GetDirectoryByPath(path string) (directory files.Directory, err error)
- func (h *CommandExecutorHost) GetFileByPath(path string) (file files.File, err error)
- func (c *CommandExecutorHost) GetHostDescription() (hostDescription string, err error)
- func (j *CommandExecutorHost) GetHostName() (hostName string, err error)
- func (h *CommandExecutorHost) InstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File, err error)
- func (h *CommandExecutorHost) IsFtpPortOpen(verbose bool) (isOpen bool, err error)
- func (h *CommandExecutorHost) IsPingable(verbose bool) (isPingable bool, err error)
- func (h *CommandExecutorHost) IsReachable(verbose bool) (isReachable bool, err error)
- func (h *CommandExecutorHost) IsTcpPortOpen(portNumber int, verbose bool) (isOpen bool, err error)
- func (h *CommandExecutorHost) MustAddSshHostKeyToKnownHosts(verbose bool)
- func (h *CommandExecutorHost) MustCheckFtpPortOpen(verbose bool)
- func (h *CommandExecutorHost) MustCheckReachable(verbose bool)
- func (c *CommandExecutorHost) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
- func (h *CommandExecutorHost) MustGetComment() (comment string)
- func (h *CommandExecutorHost) MustGetDirectoryByPath(path string) (directory files.Directory)
- func (h *CommandExecutorHost) MustGetHostDescription() (hostDescription string)
- func (h *CommandExecutorHost) MustGetHostName() (hostname string)
- func (h *CommandExecutorHost) MustInstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File)
- func (h *CommandExecutorHost) MustIsFtpPortOpen(verbose bool) (isOpen bool)
- func (h *CommandExecutorHost) MustIsPingable(verbose bool) (isPingable bool)
- func (c *CommandExecutorHost) MustIsReachable(verbose bool) (isReachable bool)
- func (h *CommandExecutorHost) MustIsTcpPortOpen(portNumber int, verbose bool) (isOpen bool)
- func (h *CommandExecutorHost) MustRemoveSshHostKeyFromKnownHosts(verbose bool)
- func (h *CommandExecutorHost) MustRenewSshHostKey(verbose bool)
- func (c *CommandExecutorHost) MustRunCommand(options *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput)
- func (c *CommandExecutorHost) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
- func (h *CommandExecutorHost) MustSetComment(comment string)
- func (h *CommandExecutorHost) MustWaitUntilPingable(verbose bool)
- func (c *CommandExecutorHost) MustWaitUntilReachable(renewHostKey bool, verbose bool)
- func (h *CommandExecutorHost) RemoveSshHostKeyFromKnownHosts(verbose bool) (err error)
- func (h *CommandExecutorHost) RenewSshHostKey(verbose bool) (err error)
- func (c *CommandExecutorHost) RunCommand(options *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
- func (c *CommandExecutorHost) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
- func (h *CommandExecutorHost) SetComment(comment string) (err error)
- func (h *CommandExecutorHost) WaitUntilPingable(verbose bool) (err error)
- func (h *CommandExecutorHost) WaitUntilReachable(renewHostKey bool, verbose bool) (err error)
- type Host
- func GetCommandExecutorHostByCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (host Host, err error)
- func GetHostByHostname(hostname string) (host Host, err error)
- func GetLocalCommandExecutorHost() (host Host, err error)
- func GetLocalHost() (host Host, err error)
- func MustGetCommandExecutorHostByCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (host Host)
- func MustGetHostByHostname(hostname string) (host Host)
- func MustGetLocalCommandExecutorHost() (host Host)
- func MustGetLocalHost() (host Host)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommandExecutorHost ¶
type CommandExecutorHost struct { commandexecutor.CommandExecutorBase Comment string // contains filtered or unexported fields }
func NewCommandExecutorHost ¶
func NewCommandExecutorHost() (c *CommandExecutorHost)
func (*CommandExecutorHost) AddSshHostKeyToKnownHosts ¶
func (h *CommandExecutorHost) AddSshHostKeyToKnownHosts(verbose bool) (err error)
func (*CommandExecutorHost) CheckFtpPortOpen ¶
func (h *CommandExecutorHost) CheckFtpPortOpen(verbose bool) (err error)
func (*CommandExecutorHost) CheckReachable ¶
func (h *CommandExecutorHost) CheckReachable(verbose bool) (err error)
func (*CommandExecutorHost) GetCommandExecutor ¶
func (c *CommandExecutorHost) GetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor, err error)
func (*CommandExecutorHost) GetComment ¶
func (h *CommandExecutorHost) GetComment() (comment string, err error)
func (*CommandExecutorHost) GetDirectoryByPath ¶
func (c *CommandExecutorHost) GetDirectoryByPath(path string) (directory files.Directory, err error)
func (*CommandExecutorHost) GetFileByPath ¶ added in v0.211.0
func (h *CommandExecutorHost) GetFileByPath(path string) (file files.File, err error)
func (*CommandExecutorHost) GetHostDescription ¶
func (c *CommandExecutorHost) GetHostDescription() (hostDescription string, err error)
func (*CommandExecutorHost) GetHostName ¶
func (j *CommandExecutorHost) GetHostName() (hostName string, err error)
func (*CommandExecutorHost) InstallBinary ¶
func (h *CommandExecutorHost) InstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File, err error)
func (*CommandExecutorHost) IsFtpPortOpen ¶
func (h *CommandExecutorHost) IsFtpPortOpen(verbose bool) (isOpen bool, err error)
func (*CommandExecutorHost) IsPingable ¶
func (h *CommandExecutorHost) IsPingable(verbose bool) (isPingable bool, err error)
func (*CommandExecutorHost) IsReachable ¶
func (h *CommandExecutorHost) IsReachable(verbose bool) (isReachable bool, err error)
func (*CommandExecutorHost) IsTcpPortOpen ¶
func (h *CommandExecutorHost) IsTcpPortOpen(portNumber int, verbose bool) (isOpen bool, err error)
func (*CommandExecutorHost) MustAddSshHostKeyToKnownHosts ¶
func (h *CommandExecutorHost) MustAddSshHostKeyToKnownHosts(verbose bool)
func (*CommandExecutorHost) MustCheckFtpPortOpen ¶
func (h *CommandExecutorHost) MustCheckFtpPortOpen(verbose bool)
func (*CommandExecutorHost) MustCheckReachable ¶
func (h *CommandExecutorHost) MustCheckReachable(verbose bool)
func (*CommandExecutorHost) MustGetCommandExecutor ¶
func (c *CommandExecutorHost) MustGetCommandExecutor() (commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorHost) MustGetComment ¶
func (h *CommandExecutorHost) MustGetComment() (comment string)
func (*CommandExecutorHost) MustGetDirectoryByPath ¶
func (h *CommandExecutorHost) MustGetDirectoryByPath(path string) (directory files.Directory)
func (*CommandExecutorHost) MustGetHostDescription ¶
func (h *CommandExecutorHost) MustGetHostDescription() (hostDescription string)
func (*CommandExecutorHost) MustGetHostName ¶
func (h *CommandExecutorHost) MustGetHostName() (hostname string)
func (*CommandExecutorHost) MustInstallBinary ¶
func (h *CommandExecutorHost) MustInstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File)
func (*CommandExecutorHost) MustIsFtpPortOpen ¶
func (h *CommandExecutorHost) MustIsFtpPortOpen(verbose bool) (isOpen bool)
func (*CommandExecutorHost) MustIsPingable ¶
func (h *CommandExecutorHost) MustIsPingable(verbose bool) (isPingable bool)
func (*CommandExecutorHost) MustIsReachable ¶
func (c *CommandExecutorHost) MustIsReachable(verbose bool) (isReachable bool)
func (*CommandExecutorHost) MustIsTcpPortOpen ¶
func (h *CommandExecutorHost) MustIsTcpPortOpen(portNumber int, verbose bool) (isOpen bool)
func (*CommandExecutorHost) MustRemoveSshHostKeyFromKnownHosts ¶
func (h *CommandExecutorHost) MustRemoveSshHostKeyFromKnownHosts(verbose bool)
func (*CommandExecutorHost) MustRenewSshHostKey ¶
func (h *CommandExecutorHost) MustRenewSshHostKey(verbose bool)
func (*CommandExecutorHost) MustRunCommand ¶
func (c *CommandExecutorHost) MustRunCommand(options *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput)
func (*CommandExecutorHost) MustSetCommandExecutor ¶
func (c *CommandExecutorHost) MustSetCommandExecutor(commandExecutor commandexecutor.CommandExecutor)
func (*CommandExecutorHost) MustSetComment ¶
func (h *CommandExecutorHost) MustSetComment(comment string)
func (*CommandExecutorHost) MustWaitUntilPingable ¶
func (h *CommandExecutorHost) MustWaitUntilPingable(verbose bool)
func (*CommandExecutorHost) MustWaitUntilReachable ¶
func (c *CommandExecutorHost) MustWaitUntilReachable(renewHostKey bool, verbose bool)
func (*CommandExecutorHost) RemoveSshHostKeyFromKnownHosts ¶
func (h *CommandExecutorHost) RemoveSshHostKeyFromKnownHosts(verbose bool) (err error)
func (*CommandExecutorHost) RenewSshHostKey ¶
func (h *CommandExecutorHost) RenewSshHostKey(verbose bool) (err error)
func (*CommandExecutorHost) RunCommand ¶
func (c *CommandExecutorHost) RunCommand(options *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error)
func (*CommandExecutorHost) SetCommandExecutor ¶
func (c *CommandExecutorHost) SetCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (err error)
func (*CommandExecutorHost) SetComment ¶
func (h *CommandExecutorHost) SetComment(comment string) (err error)
func (*CommandExecutorHost) WaitUntilPingable ¶
func (h *CommandExecutorHost) WaitUntilPingable(verbose bool) (err error)
func (*CommandExecutorHost) WaitUntilReachable ¶
func (h *CommandExecutorHost) WaitUntilReachable(renewHostKey bool, verbose bool) (err error)
type Host ¶
type Host interface { CheckReachable(verbose bool) (err error) GetDirectoryByPath(path string) (directory files.Directory, err error) GetHostDescription() (hostDescription string, err error) GetHostName() (hostName string, err error) InstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File, err error) MustCheckReachable(verbose bool) MustGetDirectoryByPath(path string) (directory files.Directory) MustGetHostDescription() (hostDescription string) MustGetHostName() (hostName string) MustInstallBinary(installOptions *parameteroptions.InstallOptions) (installedFile files.File) MustRunCommand(runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput) RunCommand(runCommandOptions *parameteroptions.RunCommandOptions) (commandOutput *commandexecutor.CommandOutput, err error) // All methods below this line can be implemented by embedding the `CommandExecutorBase` struct: RunCommandAndGetStdoutAsString(runCommandOptions *parameteroptions.RunCommandOptions) (stdout string, err error) MustRunCommandAndGetStdoutAsString(runCommandOptions *parameteroptions.RunCommandOptions) (stdout string) }
Host like a VM, Laptop, Desktop, Server.
func GetCommandExecutorHostByCommandExecutor ¶
func GetCommandExecutorHostByCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (host Host, err error)
Get a Host by a CommandExecutor capable of executing commands on the Host. E.g. for SSH a SSHCLient can be used.
func GetHostByHostname ¶
func GetLocalHost ¶
func MustGetCommandExecutorHostByCommandExecutor ¶
func MustGetCommandExecutorHostByCommandExecutor(commandExecutor commandexecutor.CommandExecutor) (host Host)
func MustGetHostByHostname ¶
func MustGetLocalCommandExecutorHost ¶
func MustGetLocalCommandExecutorHost() (host Host)
func MustGetLocalHost ¶
func MustGetLocalHost() (host Host)
Click to show internal directories.
Click to hide internal directories.