sftp

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEncryptedKeyNoPassphrase = errors.New("SSH key is encrypted but no key_pass provided")
)

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	// contains filtered or unexported fields
}

func ParseAuthFromURL

func ParseAuthFromURL(u *url.URL) AuthConfig

func (AuthConfig) BuildAuthMethods

func (a AuthConfig) BuildAuthMethods() ([]ssh.AuthMethod, error)

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string, logger logger.Logger) *Client

func (*Client) MakeDir

func (c *Client) MakeDir(ctx context.Context, remotePath string) error

func (*Client) Remove

func (c *Client) Remove(ctx context.Context, remotePath string) error

func (*Client) RemoveDir

func (c *Client) RemoveDir(ctx context.Context, remotePath string) error

func (*Client) RemoveFile

func (c *Client) RemoveFile(ctx context.Context, remotePath string) error

func (*Client) UploadFile

func (c *Client) UploadFile(ctx context.Context, remotePath string, localPath string) error

type Config

type Config struct {
	Host           string
	Port           string
	Username       string
	Auth           AuthConfig
	ConnectTimeout time.Duration
}

func ParseConfigFromURL

func ParseConfigFromURL(u *url.URL) (Config, error)

Jump to

Keyboard shortcuts

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