Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveSettings ¶
Types ¶
type ConnConfig ¶
type ConnConfig struct { DriverName string `json:"driver_name" yaml:"driver_name"` TablePrefix string `json:"table_prefix" yaml:"table_prefix"` ReadOnly string `json:"read_only" yaml:"read_only"` Params dialect.ConnParams }
type DataSource ¶
type DataSource struct { ConnKey string TablePrefix string Dialect dialect.Dialect *ReverseSource }
func NewDataSource ¶
func NewDataSource(k string, c ConnConfig) *DataSource
type ReverseConfig ¶
type ReverseConfig struct { Kind string `yaml:"kind"` Name string `yaml:"name"` Source ReverseSource `yaml:"source"` Targets []ReverseTarget `yaml:"targets"` }
ReverseConfig represents a reverse configuration
type ReverseSource ¶
ReverseSource represents a reverse source which should be a database connection
type ReverseTarget ¶
type ReverseTarget struct { Type string `yaml:"type"` IncludeTables []string `yaml:"include_tables"` ExcludeTables []string `yaml:"exclude_tables"` TableMapper string `yaml:"table_mapper"` ColumnMapper string `yaml:"column_mapper"` TemplatePath string `yaml:"template_path"` Template string `yaml:"template"` MultipleFiles bool `yaml:"multiple_files"` OutputDir string `yaml:"output_dir"` TablePrefix string `yaml:"table_prefix"` Language string `yaml:"language"` Funcs map[string]string `yaml:"funcs"` Formatter string `yaml:"formatter"` Importter string `yaml:"importter"` ExtName string `yaml:"ext_name"` NameSpace string `yaml:"name_space"` GenJsonTag bool `yaml:"gen_json_tag"` GenTableName bool `yaml:"gen_table_name"` ApplyMixins bool `yaml:"apply_mixins"` }
ReverseTarget represents a reverse target
func (ReverseTarget) GetFileName ¶
func (t ReverseTarget) GetFileName(name string) string
func (ReverseTarget) MergeOptions ¶
func (t ReverseTarget) MergeOptions(name, tablePrefix string) ReverseTarget
type Settings ¶
type Settings struct { Application AppConfig `json:"application" yaml:"application"` Connections map[string]ConnConfig `json:"connections" yaml:"connections"` ReverseTargets []ReverseTarget `json:"reverse_targets" yaml:"reverse_targets"` // contains filtered or unexported fields }
func GetSettings ¶
func GetSettings() *Settings
func ReadSettings ¶
func (*Settings) GetDataSources ¶
func (cfg *Settings) GetDataSources(names []string) (ds []*DataSource)
Click to show internal directories.
Click to hide internal directories.