Documentation ¶
Index ¶
- Variables
- func BulkInsert(tableName string, filePath string) (err error)
- func BulkInsertFile(filePath string)
- func BulkReadDirectory(dirPath, dbFolderPath string) (files []string, err error)
- func File2Table(filePath string) (tableName string, err error)
- func ProcessDirectory(fileDirectoryPath, postgresDirectoryPath string)
- func ReadFile(filePath string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoFilesFound = errors.New("no files found")
View Source
var ErrorNoPrefix = errors.New("can not find a corresponding prefix")
ErrorNoPrefix is the error returned when no prefix can be extracted
View Source
var ErrorNoTableName = errors.New("can not find a corresponding table name")
ErrorNoTableName is the error returned when no table name is found based on the filename
View Source
var RegexTls = regexp.MustCompile(`^(tls[0-9]{3})`)
RegexTls is the regexp for matching the prefix of a file name
Functions ¶
func BulkInsert ¶
func BulkInsertFile ¶
func BulkInsertFile(filePath string)
BulkInsertFile reads a file and creates the db entries in batches
func BulkReadDirectory ¶
func File2Table ¶
File2Table is a map of filename to table name
func ProcessDirectory ¶
func ProcessDirectory(fileDirectoryPath, postgresDirectoryPath string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.