Documentation
¶
Index ¶
- Variables
- func BuildQuery(table string) string
- func Check(err error)
- func CheckExtractFiles() error
- func CheckMem(msg string)
- func Debug(msg string)
- func DebugVerbose(msg string)
- func DownloadFiles(url string, path string, attr string, list string, tag string, prefix string, ...) []string
- func Error(msg AppMsg, shutdown bool)
- func ExtractFile(file string)
- func ExtractToFolder(file string, outputDirectory string)
- func Fail(msg string)
- func GetDataFolder() string
- func GetFieldList(table string) []string
- func GetOutputFolder() string
- func GetPage(url string) *http.Response
- func HandleAlpha(record []string) string
- func HandleAlphaLong(record []string) string
- func HandleNumeric(record []string) string
- func HandleNumericJson(record []string) string
- func HandleNumericLong(record []string) string
- func HandleReport(record []string) string
- func HandleReportJson(record []string) string
- func HandleReportLong(record []string) string
- func HandleRollup(record []string) string
- func HandleRollupJson(record []string) string
- func HandleRollupLong(record []string) string
- func LoadConfig(file string) error
- func Match(n *html.Node, tag string, text string) bool
- func Ok(msg string)
- func ParseContent(response *http.Response) *html.Node
- func Pass(msg string)
- func ReadCsv(content string, data string)
- func SQLiteClose() error
- func SQLiteConnect(file string) error
- func SQLiteExecute(sql string) (int64, error)
- func SetupDb() error
- func WatchMem()
- func WriteQueueToDb(table string) error
- func WriteQueueToFile(fileType string) error
- func WriteResultToDb(query string) error
- func WriteStringToFile(output string, file string) error
- func WriteToLog(msg string)
- func WriteToLogFAIL(msg string)
- func WriteToLogOK(msg string)
- type AppMsg
- type BaseTableAlpha
- type BaseTableNumeric
- type BaseTableReport
- type BaseTableRollup
- type Config
Constants ¶
This section is empty.
Variables ¶
var DB *sql.DB
DB holds the open database connection.
var OutputFile *os.File
var OutputQueue []string
Functions ¶
func BuildQuery ¶
func Check ¶
func Check(err error)
Check handles checking err in a standard way. It triggers a generic message if an error is present.
func CheckExtractFiles ¶
func CheckExtractFiles() error
func Debug ¶
func Debug(msg string)
Debug prints out generic messages if the configuration turns Debug on.
func DebugVerbose ¶
func DebugVerbose(msg string)
func DownloadFiles ¶
func ExtractToFolder ¶
func GetDataFolder ¶
func GetDataFolder() string
func GetFieldList ¶
func GetOutputFolder ¶
func GetOutputFolder() string
func HandleAlpha ¶
func HandleAlphaLong ¶
func HandleNumeric ¶
func HandleNumericJson ¶
func HandleNumericLong ¶
func HandleReport ¶
func HandleReportJson ¶
func HandleReportLong ¶
func HandleRollup ¶
func HandleRollupJson ¶
func HandleRollupLong ¶
func LoadConfig ¶
LoadConfig expects a file in yaml format. It returns any error encountered reading the file.
func SQLiteConnect ¶
SQLiteConnect connects to the supplied sqlite file path.
func SQLiteExecute ¶
SQLiteExecute executes the supplied SQL string.
func WriteQueueToDb ¶
func WriteQueueToFile ¶
func WriteResultToDb ¶
func WriteStringToFile ¶
func WriteToLog ¶
func WriteToLog(msg string)
func WriteToLogFAIL ¶
func WriteToLogFAIL(msg string)
func WriteToLogOK ¶
func WriteToLogOK(msg string)
Types ¶
type BaseTableAlpha ¶
type BaseTableAlpha struct {
C1_RptRecNum string `json:"C1_RptRecNum"`
C2_WkshtNum string `json:"C2_WkshtNum"`
C3_LineNum string `json:"C3_LineNum"`
C4_ClmnNum string `json:"C4_ClmnNum"`
C5_ItmAlphnmrcItmTxt string `json:"C5_ItmAlphnmrcItmTxt"`
}
func HandleAlphaJson ¶
func HandleAlphaJson(record []string) BaseTableAlpha
type BaseTableNumeric ¶
type BaseTableReport ¶
type BaseTableReport struct {
C1_RptRecNum string
C2_PrvdrCtrlTypeCd string
C3_PrvdrNum string
C4_Npi string
C5_RptStusCd string
C6_FyBgnDt string
C7_FyEndDt string
C8_ProcDt string
C9_InitlRptSw string
C10_LastRptSw string
C11_TrnsmtlNum string
C12_FiNum string
C13_AdrVndrCd string
C14_FiCreatDt string
C15_UtilCd string
C16_NprDt string
C17_SpecInd string
C18_FiRcptDt string
}
type BaseTableRollup ¶
type Config ¶
type Config struct {
Source struct {
Download bool `yaml:"download"`
Directory string `yaml:"directory"`
FixedDate string `yaml:"fixedDate"`
Url string `yaml:"url"`
Path string `yaml:"path"`
List string `yaml:"list"`
TagAttr string `yaml:"tagAttr"`
TagMatch string `yaml:"tagMatch"`
Host string `yaml:"host"`
Password string `yaml:"password"`
} `yaml:"source"`
Store struct {
Extract bool `yaml:"extract"`
Directory string `yaml:"directory"`
Prefix string `yaml:"prefix"`
Ext string `yaml:"ext"`
File string `yaml:"file"`
MaxQueue int `yaml:"maxqueue"`
} `yaml:"store"`
Settings struct {
Debug bool `yaml:"debug"`
Verbose bool `yaml:"verbose"`
Output string `yaml:"output"`
Logfile string `yaml:"logfile"`
} `yaml:"settings"`
}
Config is built from the yaml configuration file. It provides all configuration values for the application.
var AppConfig Config
AppConfig holds the configuration from the loaded yaml file.