sftputil

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort = int64(22)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SftpClient

type SftpClient struct {
	Client *sftp.Client
	// contains filtered or unexported fields
}

func NewSftpClientWithKeyPath

func NewSftpClientWithKeyPath(hostname string, port int64, username string, keyPath string) (SftpClient, error)

func NewSftpClientWithPassword

func NewSftpClientWithPassword(hostname string, port int64, username string, password string) (SftpClient, error)

func (*SftpClient) Connect

func (c *SftpClient) Connect() error

func (*SftpClient) Get

func (c *SftpClient) Get(sPathRem string, sPathLoc string) error

func (*SftpClient) GetKey

func (c *SftpClient) GetKey(sKeyPath string) (key ssh.Signer, err error)

func (*SftpClient) Put

func (c *SftpClient) Put(sPathLoc string, sPathRem string) error

func (*SftpClient) SetCredentials

func (c *SftpClient) SetCredentials(hostname string, port int64, username string, keyPath string, password string)

Jump to

Keyboard shortcuts

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