Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVOptions ¶
type CSVOptions struct { SkipRows uint `json:"skip_rows"` Delimiter string `json:"delimiter"` CreateTableOptions string `json:"create_table_opts"` Columns []ColumnOptions `json:"columns"` }
CSVOptions holds the csv options info
type ColumnOptions ¶
type ColumnOptions struct { ColumnIndex int `json:"column_index"` Name string `json:"name"` SQLType string `json:"sql_type"` SQLFormatter string `json:"sql_formatter"` }
ColumnOptions holds the options for retrieving and storing desired column info
type DBInfo ¶
type DBInfo struct { Username string `json:"username"` Password string `json:"password"` Address string `json:"address"` Name string `json:"dbname"` }
DBInfo holds the database config info for the mysql connection
type Device ¶
type Device struct { Name string `json:"name"` FilePath string `json:"filepath"` Address string `json:"address"` CsvOptions CSVOptions `json:"csv_options"` }
Device holds the device data info
func (*Device) GetFilteredRecords ¶
GetFilteredRecords gets the records with the deisred column data from the appropriate data source, all according to the device config info, The records returned are in the appropriate format for direct usage in the mysql insert query
Click to show internal directories.
Click to hide internal directories.