Documentation ¶
Index ¶
- func AddOneCsvRow(writer *csv.Writer, row []string) error
- func AddOneMetaRow(writer *csv.Writer, dataRow config.RowTypesMeta) error
- func CountAndListCSVFiles(folderPath string) (int, []string, error)
- func DeleteLocalFolder(folderToDelete string) error
- func DetermineBackupFileName(fileName string, fileNumber int, collectionName string, timeStamp string, ...) (newFileName string, newFileNumber int, oldNameBackupFile string, err error)
- func GetFilePath(fileName string, timeStamp string) (filePath string)
- func GetFileSizeByDescriptor(file *os.File) (int64, error)
- func GetFileSizeByPath(filePath string) (int64, error)
- func GetSubFolder(timeStamp string) (pathSubFolder string)
- func IsFileEmptyByDescriptor(file *os.File) (bool, error)
- func IsFileEmptyByFilePath(filePath string) (bool, error)
- func ListLocalFolderNames(folderPath string) ([]string, error)
- func LocalFileExists(path string) (bool, error)
- func LocalFolderExists(folderPath string) (bool, error)
- func ValidateCSVHeaders(csvFile *os.File, expectedHeaders []string) error
- func WillExceedBackupFileSize(dataToAdd *[]primitive.M, filePath string) (fileTooLarge bool, err error)
- func WriteHeadersToCsvFile(file *os.File, headers []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddOneCsvRow ¶
///////////////////////////////////////////////////////////////////////// Add one row to CSV file
func AddOneMetaRow ¶
func AddOneMetaRow(writer *csv.Writer, dataRow config.RowTypesMeta) error
///////////////////////////////////////////////////////////////////////// Add a single row to meta CSV file using specific format
func CountAndListCSVFiles ¶
Count and list folder paths locally inside specified folder path
func DeleteLocalFolder ¶
Delete local folder entirely
func DetermineBackupFileName ¶
func DetermineBackupFileName(fileName string, fileNumber int, collectionName string, timeStamp string, fileSizeExceeding bool) (newFileName string, newFileNumber int, oldNameBackupFile string, err error)
Determine file name depending on backup file size. Create new backup file name if cureent file size exceeds maximum size by using base backup file name and utilizing subsequent numbering
func GetFilePath ¶
Get entire file path depending on timestamp, file name and name of backup folder
func GetFileSizeByDescriptor ¶
Get file size in bytes of any file type by using Go file descriptor as parameter type
func GetFileSizeByPath ¶
Get file size in bytes of any file type by using Go file descriptor as parameter type
func GetSubFolder ¶
Create name of subfolder path
func IsFileEmptyByDescriptor ¶
Validate if file of any type is empty by using Go file descriptor as parameter type
func IsFileEmptyByFilePath ¶
Validate if file of any type is empty by using file path of type string
func ListLocalFolderNames ¶
List all folder names as string slice inside a given local path
func LocalFileExists ¶
/////////////////////////////////////////////////////////// Check if local file exists /////////
func LocalFolderExists ¶
/////////////////////////////////////////////////////////// Check if folder exists /////////
func ValidateCSVHeaders ¶
///////////////////////////////////////////////////////////////////////////// Validate headers of csv file /////////
Types ¶
This section is empty.