Documentation
¶
Index ¶
- func Connect(projectConf map[string]string, sshType string) *ssh.Client
- func Disconnect(conn *ssh.Client)
- func DownloadFile(scp *sftp.Client, remoteFile, localFile string, imagesOnly, compress bool) (err error)
- func ListFiles(chDownload *sync.WaitGroup, ch chan bool, remoteDir, subdir string, indx int, ...) (err error)
- func NewClient(conn *ssh.Client) *sftp.Client
- func RunCommand(conn *ssh.Client, cmd string) string
- func RunCommandSafe(conn *ssh.Client, cmd string) (string, error)
- func SetSSHConfigProvider(p SSHConfigProvider)
- type RemoteDbStruct
- type SSHConfigProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Disconnect ¶
func DownloadFile ¶
func RunCommandSafe ¶
RunCommandSafe runs a remote command and returns its combined output together with any error, without aborting the process. Use it for optional probes (e.g. checking whether a binary exists on the remote host).
func SetSSHConfigProvider ¶
func SetSSHConfigProvider(p SSHConfigProvider)
SetSSHConfigProvider sets a custom provider for creating SSH client configurations.
Types ¶
type RemoteDbStruct ¶
type RemoteDbStruct struct {
Host string `json:"host"`
Dbname string `json:"dbname"`
Username string `json:"username"`
Password string `json:"password"`
Active string `json:"active"`
Model string `json:"model"`
Engine string `json:"engine"`
InitStatements string `json:"initStatements"`
Port string `json:"port"`
}
type SSHConfigProvider ¶
type SSHConfigProvider interface {
ClientConfig(host, port, user, password, keyPath string) (*ssh.ClientConfig, error)
}
SSHConfigProvider allows enterprise to customize SSH client configuration. For example, to verify host keys via known_hosts or use certificate-based auth.
Click to show internal directories.
Click to hide internal directories.