Documentation
¶
Overview ¶
Package host contains definition of Host data model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Host ¶
type Host struct { ID int `yaml:"-"` Title string `yaml:"title"` Description string `yaml:"description,omitempty"` Group string `yaml:"group,omitempty"` Address string `yaml:"address"` RemotePort string `yaml:"network_port,omitempty"` LoginName string `yaml:"username,omitempty"` IdentityFilePath string `yaml:"identity_file_path,omitempty"` SSHClientConfig *ssh.Config `yaml:"-"` }
Host model definition.
func NewHost ¶
func NewHost(id int, title, description, address, loginName, identityFilePath, remotePort string) Host
NewHost - constructs new Host model.
func (*Host) CmdSSHConfig ¶
CmdSSHConfig - returns SSH command for loading host default configuration.
func (*Host) CmdSSHConnect ¶
CmdSSHConnect - returns SSH command for connecting to a remote host.
func (*Host) CmdSSHCopyID ¶ added in v1.2.0
CmdSSHCopyID - returns SSH command for copying SSH key to a remote host (see ssh-copy-id).
func (*Host) IsUserDefinedSSHCommand ¶
IsUserDefinedSSHCommand returns true if the address contains spaces or "@" symbol, true means that user uses a custom config and not relying on LoginName, IdentityFilePath and RemotePort.
Click to show internal directories.
Click to hide internal directories.