Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnDef ¶
type ColumnDef struct { Type string `yaml:"Type" validate:"required"` Nullable float64 `yaml:"Nullable" validate:"optional"` First string `yaml:"First" validate:"optional"` MinVal string `yaml:"MinVal" validate:"optional"` MaxVal string `yaml:"MaxVal" validate:"optional"` OneOf string `yaml:"OneOf" validate:"optional"` Length int `yaml:"Length" validate:"optional"` Format string `yaml:"Format" validate:"optional"` }
ColumnDef defines the type of data we want inserted into a single column of a particular database table.
type RunArgs ¶
type RunArgs struct { Database string `validate:"required"` Host string `validate:"required"` Password string `validate:"required"` Port string `validate:"required,number,gt=0"` Safe bool Tables []string `validate:"required,gt=0"` User string `validate:"required"` }
RunArgs is a container for command-line flags passed in.
type TableDef ¶
type TableDef struct { TableName string `yaml:"TableName" validate:"required"` TotalRecords int `yaml:"TotalRecords" validate:"required,gt=0"` BatchSize int `yaml:"BatchSize" validate:"required,gt=0"` SafeImport bool // TODO: should this be global? Columns map[string]ColumnDef `yaml:"Columns" validate:"required,dive,keys,required,endkeys"` }
TableDef describes one particular database table. Its data is (mostly) loaded from a YAML file.
Click to show internal directories.
Click to hide internal directories.