Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
type FileWriter struct{}
FileWriter - One implementation of the Writer interface. This one will write to txt files, and generate file names like yyyy-mm-dd-exchange-market.txt.
func (*FileWriter) GetWriteFileName ¶
func (f *FileWriter) GetWriteFileName(exchange string, market string) string
GetWriteFileName - Will generate the file name for you of the format yyyy-mm-dd-exchange-market.txt. New files will be created at midnight because the scrapers are calling this method each time before writing to file.
type Writer ¶
type Writer interface { GetWriteFileName(exchange string, market string) string // will return the name of the file in which it will write Write(line string, filename string) (int, error) // returns number of bytes written or error }
Writer is an interface that is responsible for generating dynamic file names (to create new files at midnight) and writing data to them
Click to show internal directories.
Click to hide internal directories.