Documentation ¶
Index ¶
Constants ¶
View Source
const ConnStr string = "user=%s password=%s host=%s port=%d database=%s sslmode=disable "
Variables ¶
This section is empty.
Functions ¶
func Export2Csv ¶
func ImportCsv2DB ¶
Types ¶
type Config ¶
type Config struct { DBHost string `json:"dbHost"` DBName string `json:"dbName"` DBUser string `json:"dbUser"` DBPassword string `json:"dbPassword"` DBPort int `json:"dbPort"` Action Action `json:"action"` ExportTable *ExportTable `json:"exportTable"` ImportTable *ImportTableConf `json:"importTable"` }
func LoadConfig ¶
func (*Config) ImportAction ¶
type ExportTable ¶
type IgnoreColumn ¶
type ImportTable ¶
type ImportTable struct { TableName string `json:"tableName"` FileName string `json:"fileName"` IgnoreColumns []IgnoreColumn `json:"ignoreColumns"` Header []string TargetFds []pgconn.FieldDescription }
func (*ImportTable) String ¶
func (t *ImportTable) String() string
type ImportTableConf ¶
type ImportTableConf struct { ImportPath string `json:"importPath"` ImportTables []*ImportTable `json:"tables"` }
Click to show internal directories.
Click to hide internal directories.