Documentation ¶
Index ¶
- func CloneRepoBranchOrCommit(repoURL, publicKey, branchOrCommit, destDir 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 GetRepositoryBranchesAndTags(repoURL string, publicKey string) ([]string, []string, 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneRepoBranchOrCommit ¶
CloneRepoBranchOrCommit 克隆指定分支或提交
func ConnectSFTP ¶
ConnectSFTP 连接到SFTP服务器
func ConnectToSSHServer ¶
ConnectToSSHServer 使用SSH私钥连接到SSH服务器
func ExecuteSSHCommand ¶
ExecuteSSHCommand 在SSH会话中执行命令并返回输出结果
func GenerateRSAKeys ¶
GenerateRSAKeys 生成2048位的RSA密钥对,并以OpenSSH格式返回公钥和PEM格式返回私钥
func GetRepositoryBranchesAndTags ¶
GetRepositoryBranchesAndTags 获取 Git 仓库的分支和 Tags
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.