ftp

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewServerConn

func NewServerConn(ctx context.Context) (*ftp.ServerConn, error)

NewServerConn returns a new ftp server connection with default options.

func NewServerConnWithConfigPath

func NewServerConnWithConfigPath(ctx context.Context, path string) (*ftp.ServerConn, error)

NewServerConnWithConfigPath returns a new ftp server connection with options from config path.

func NewServerConnWithOptions

func NewServerConnWithOptions(ctx context.Context, options *Options) (*ftp.ServerConn, error)

NewServerConnWithOptions returns a new ftp server connection with options.

Types

type Options

type Options struct {
	Addr     string
	User     string
	Password string
	Timeout  int
	Retry    int
}

Options ftp server connection options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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