Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunReverse ¶
func RunReverse(source *ReverseSource, target *ReverseTarget) error
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 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"`
}
ReverseTarget represents a reverse target
type ServConfig ¶
type ServConfig struct {
Protocol string `json:"protocol" yaml:"protocol"`
Params dialect.ConnParams
}
type Settings ¶
type Settings struct {
IsEmpty bool `json:"-" yaml:"-"`
Application AppConfig `json:"application" yaml:"application"`
Connections map[string]ConnConfig `json:"connections" yaml:"connections"`
MicroServices []ServConfig `json:"micro_services" yaml:"micro_services"`
ReverseTargets []ReverseTarget `json:"reverse_targets" yaml:"reverse_targets"`
}
func GetSettings ¶
func GetSettings() *Settings
func ReadSettings ¶
func (Settings) GetSource ¶
func (cfg Settings) GetSource(name string) (ReverseSource, ConnConfig)
Click to show internal directories.
Click to hide internal directories.