Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinderService ¶
func (*FinderService) GiveNextFileName ¶
func (s *FinderService) GiveNextFileName() (string, error)
type IFinder ¶
type IFinder interface { // GiveNextFileName returns the name of the next csv file to process GiveNextFileName() (fileName string, err error) // Relocate changes csv file location Relocate(filePath string, date time.Time, newFolder Directory) }
IFinder provides contracts related to find report files on filesystem
type IProcess ¶
type IProcess interface {
MakeSummary(transactions []domain.Transaction) domain.Summary
}
IProcess provides contracts related to process report files
type IReader ¶
type IReader interface {
ReadFile(fileName string) ([]domain.Transaction, []domain.IgnoredTransaction, error)
}
IReader contracts related to read report files
type ProcessService ¶
type ProcessService struct{}
ProcessService provides implements IProcess with the challenge's business rules
func (*ProcessService) MakeSummary ¶
func (s *ProcessService) MakeSummary(transactions []domain.Transaction) domain.Summary
type ReaderService ¶
type ReaderService struct{}
ReaderService implements IReader reading for a csv file on current file system.
func (*ReaderService) ReadFile ¶
func (s *ReaderService) ReadFile(fileName string) ([]domain.Transaction, []domain.IgnoredTransaction, error)
ReadFile reads a csv file of transactions and discriminates them by admitted or discarded
Click to show internal directories.
Click to hide internal directories.