Documentation ¶
Index ¶
- type Client
- type ClientConfig
- type File
- type MockClient
- func (c *MockClient) Close() error
- func (c *MockClient) Delete(path string) error
- func (c *MockClient) Dir() string
- func (c *MockClient) ListFiles(dir string) ([]string, error)
- func (c *MockClient) Open(path string) (*File, error)
- func (c *MockClient) Ping() error
- func (c *MockClient) Reader(path string) (*File, error)
- func (c *MockClient) UploadFile(path string, contents io.ReadCloser) error
- func (c *MockClient) Walk(dir string, fn fs.WalkDirFunc) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type ClientConfig ¶
type ClientConfig struct { Hostname string Username string Password string Timeout time.Duration MaxConnections int PacketSize int HostPublicKey string // ClientPrivateKey must be a base64 encoded string ClientPrivateKey string ClientPrivateKeyPassword string // not base64 encoded SkipChmodAfterUpload bool SkipDirectoryCreation bool }
type File ¶
type File struct { Filename string Contents io.ReadCloser // ModTime is a timestamp of when the last modification occurred // to this file. The default will be the current UTC time. ModTime time.Time // contains filtered or unexported fields }
File represents a fs.File object of a location on a SFTP server.
type MockClient ¶
type MockClient struct { Err error // contains filtered or unexported fields }
func NewMockClient ¶
func NewMockClient(t *testing.T) *MockClient
func (*MockClient) Close ¶
func (c *MockClient) Close() error
func (*MockClient) Delete ¶
func (c *MockClient) Delete(path string) error
func (*MockClient) Dir ¶
func (c *MockClient) Dir() string
func (*MockClient) Ping ¶
func (c *MockClient) Ping() error
func (*MockClient) UploadFile ¶
func (c *MockClient) UploadFile(path string, contents io.ReadCloser) error
func (*MockClient) Walk ¶
func (c *MockClient) Walk(dir string, fn fs.WalkDirFunc) error
Click to show internal directories.
Click to hide internal directories.