xfer

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package xfer contains functions for secure file stransfer

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, 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