Documentation ¶
Index ¶
- func ACHFilenameSeq(filename string) int
- func RenderACHFilename(raw string, data FilenameData) (string, error)
- func RoundSequenceNumber(seq int) string
- func Type(cfg config.ODFI) string
- type Agent
- type FTPTransferAgent
- func (agent *FTPTransferAgent) Close() error
- func (agent *FTPTransferAgent) Delete(path string) error
- func (agent *FTPTransferAgent) GetInboundFiles() ([]File, error)
- func (agent *FTPTransferAgent) GetReturnFiles() ([]File, error)
- func (agent *FTPTransferAgent) Hostname() string
- func (agent *FTPTransferAgent) InboundPath() string
- func (agent *FTPTransferAgent) OutboundPath() string
- func (agent *FTPTransferAgent) Ping() error
- func (agent *FTPTransferAgent) ReturnPath() string
- func (agent *FTPTransferAgent) UploadFile(f File) error
- type File
- type FilenameData
- type MockAgent
- func (a *MockAgent) Close() error
- func (a *MockAgent) Delete(path string) error
- func (a *MockAgent) GetInboundFiles() ([]File, error)
- func (a *MockAgent) GetReturnFiles() ([]File, error)
- func (a *MockAgent) Hostname() string
- func (a *MockAgent) InboundPath() string
- func (a *MockAgent) OutboundPath() string
- func (a *MockAgent) Ping() error
- func (a *MockAgent) ReturnPath() string
- func (a *MockAgent) UploadFile(f File) error
- type SFTPTransferAgent
- func (agent *SFTPTransferAgent) Close() error
- func (agent *SFTPTransferAgent) Delete(path string) error
- func (agent *SFTPTransferAgent) GetInboundFiles() ([]File, error)
- func (agent *SFTPTransferAgent) GetReturnFiles() ([]File, error)
- func (agent *SFTPTransferAgent) Hostname() string
- func (agent *SFTPTransferAgent) InboundPath() string
- func (agent *SFTPTransferAgent) OutboundPath() string
- func (agent *SFTPTransferAgent) Ping() error
- func (agent *SFTPTransferAgent) ReturnPath() string
- func (agent *SFTPTransferAgent) UploadFile(f File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ACHFilenameSeq ¶
achFilenameSeq returns the sequence number from a given achFilename A sequence number of 0 indicates an error
func RenderACHFilename ¶
func RenderACHFilename(raw string, data FilenameData) (string, error)
func RoundSequenceNumber ¶
RoundSequenceNumber converts a sequence (int) to it's string value, which means 0-9 followed by A-Z
Types ¶
type Agent ¶
type Agent interface { GetInboundFiles() ([]File, error) GetReturnFiles() ([]File, error) UploadFile(f File) error Delete(path string) error InboundPath() string OutboundPath() string ReturnPath() string Hostname() string Ping() error Close() error }
Agent represents an interface for uploading and retrieving ACH files from a remote service.
type FTPTransferAgent ¶
type FTPTransferAgent struct {
// contains filtered or unexported fields
}
FTPTransferAgent is an FTP implementation of a Agent
func (*FTPTransferAgent) Close ¶
func (agent *FTPTransferAgent) Close() error
func (*FTPTransferAgent) Delete ¶
func (agent *FTPTransferAgent) Delete(path string) error
func (*FTPTransferAgent) GetInboundFiles ¶
func (agent *FTPTransferAgent) GetInboundFiles() ([]File, error)
func (*FTPTransferAgent) GetReturnFiles ¶
func (agent *FTPTransferAgent) GetReturnFiles() ([]File, error)
func (*FTPTransferAgent) Hostname ¶ added in v0.9.0
func (agent *FTPTransferAgent) Hostname() string
func (*FTPTransferAgent) InboundPath ¶
func (agent *FTPTransferAgent) InboundPath() string
func (*FTPTransferAgent) OutboundPath ¶
func (agent *FTPTransferAgent) OutboundPath() string
func (*FTPTransferAgent) Ping ¶
func (agent *FTPTransferAgent) Ping() error
func (*FTPTransferAgent) ReturnPath ¶
func (agent *FTPTransferAgent) ReturnPath() string
func (*FTPTransferAgent) UploadFile ¶
func (agent *FTPTransferAgent) UploadFile(f File) error
uploadFile saves the content of File at the given filename in the OutboundPath directory
The File's contents will always be closed
type File ¶
type File struct { Filename string Contents io.ReadCloser }
type FilenameData ¶
type MockAgent ¶
type MockAgent struct { InboundFiles []File ReturnFiles []File UploadedFile *File // non-nil on file upload DeletedFile string // filepath of last deleted file Err error // contains filtered or unexported fields }
func (*MockAgent) GetInboundFiles ¶
func (*MockAgent) GetReturnFiles ¶
func (*MockAgent) InboundPath ¶
func (*MockAgent) OutboundPath ¶
func (*MockAgent) ReturnPath ¶
func (*MockAgent) UploadFile ¶
type SFTPTransferAgent ¶
type SFTPTransferAgent struct {
// contains filtered or unexported fields
}
func (*SFTPTransferAgent) Close ¶
func (agent *SFTPTransferAgent) Close() error
func (*SFTPTransferAgent) Delete ¶
func (agent *SFTPTransferAgent) Delete(path string) error
func (*SFTPTransferAgent) GetInboundFiles ¶
func (agent *SFTPTransferAgent) GetInboundFiles() ([]File, error)
func (*SFTPTransferAgent) GetReturnFiles ¶
func (agent *SFTPTransferAgent) GetReturnFiles() ([]File, error)
func (*SFTPTransferAgent) Hostname ¶ added in v0.9.0
func (agent *SFTPTransferAgent) Hostname() string
func (*SFTPTransferAgent) InboundPath ¶
func (agent *SFTPTransferAgent) InboundPath() string
func (*SFTPTransferAgent) OutboundPath ¶
func (agent *SFTPTransferAgent) OutboundPath() string
func (*SFTPTransferAgent) Ping ¶
func (agent *SFTPTransferAgent) Ping() error
func (*SFTPTransferAgent) ReturnPath ¶
func (agent *SFTPTransferAgent) ReturnPath() string
func (*SFTPTransferAgent) UploadFile ¶
func (agent *SFTPTransferAgent) UploadFile(f File) error
uploadFile saves the content of File at the given filename in the OutboundPath directory
The File's contents will always be closed
Click to show internal directories.
Click to hide internal directories.