xfer

package
v1.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultSshPort int = 22
View Source
const UriSchemeFile string = "file"
View Source
const UriSchemeHttp string = "http"
View Source
const UriSchemeHttps string = "https"
View Source
const UriSchemeSftp string = "sftp"

Variables

This section is empty.

Functions

func DownloadSftpFile

func DownloadSftpFile(uri string, privateKeys map[string]string, dstFile *os.File) error

func GetFileBytes

func GetFileBytes(uri string, certPath string, privateKeys map[string]string) ([]byte, error)

func GetHttpReadCloser

func GetHttpReadCloser(uri string, scheme string, certDir string) (io.ReadCloser, error)

func NewSshClientConfig

func NewSshClientConfig(user string, host string, port int, privateKeyPath string, privateKeyPassword string) (*ssh.ClientConfig, error)

func UploadSftpFile

func UploadSftpFile(srcPath string, uri string, privateKeys map[string]string) error

Types

type ParsedSftpUri

type ParsedSftpUri struct {
	User           string
	Host           string
	Port           int
	PrivateKeyPath string
	RemotePath     string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL