filetransfer

package
v0.0.0-...-de0bd9f Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package filetransfer contains the client that communicates with the Finance FTP server

Code generated by MockGen. DO NOT EDIT. Source: github.com/companieshouse/lfp-error-reporter/app/filetransfer (interfaces: FileTransfer)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileTransfer

type FileTransfer interface {
	UploadCSVFiles(csvs []models.CSV) error
}

FileTransfer provides an interface by which to upload CSV files

type MockFileTransfer

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

MockFileTransfer is a mock of FileTransfer interface

func NewMockFileTransfer

func NewMockFileTransfer(ctrl *gomock.Controller) *MockFileTransfer

NewMockFileTransfer creates a new mock instance

func (*MockFileTransfer) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockFileTransfer) UploadCSVFiles

func (m *MockFileTransfer) UploadCSVFiles(arg0 []models.CSV) error

UploadCSVFiles mocks base method

type MockFileTransferMockRecorder

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

MockFileTransferMockRecorder is the mock recorder for MockFileTransfer

func (*MockFileTransferMockRecorder) UploadCSVFiles

func (mr *MockFileTransferMockRecorder) UploadCSVFiles(arg0 interface{}) *gomock.Call

UploadCSVFiles indicates an expected call of UploadCSVFiles

type SFTP

type SFTP struct {
	Config          *config.Config
	SSHClientConfig *ssh.ClientConfig
}

SFTP provides a concrete implementation of the FileTransfer interface, transferring files to an SFTP server

func New

func New(cfg *config.Config) *SFTP

New returns a new SFTP struct using the provided config

func (*SFTP) UploadCSVFiles

func (t *SFTP) UploadCSVFiles(csvs []models.CSV) error

UploadCSVFiles uploads an array of CSV's to an STFP server

Jump to

Keyboard shortcuts

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