Documentation
¶
Index ¶
- func CloneRepo(repoAddress, privateKey, version, targetDir string) (string, string, error)
- func ConnectSFTP(serverAddress, username, privateKey string) (*sftp.Client, error)
- func ConnectToSSHServer(serverAddress, publicKey, username string) (*ssh.Client, error)
- func ExecuteSSHCommand(client *ssh.Client, commands ...string) (string, error)
- func GenerateRSAKeys() (privateKeyPEM string, publicKeySSH string, err error)
- func SyncDir(client *sftp.Client, localDir, remoteDir string) error
- func SyncFile(client *sftp.Client, localFilePath, remoteFilePath string) error
- func ZipFolder(source, target string) error
- type RepoInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectSFTP ¶
ConnectSFTP 连接到SFTP服务器
func ConnectToSSHServer ¶
ConnectToSSHServer 使用SSH私钥连接到SSH服务器
func ExecuteSSHCommand ¶
ExecuteSSHCommand 在SSH会话中执行命令并返回输出结果
func GenerateRSAKeys ¶
GenerateRSAKeys 生成2048位的RSA密钥对,并以OpenSSH格式返回公钥和PEM格式返回私钥
Types ¶
Click to show internal directories.
Click to hide internal directories.