Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdGorm = &cobra.Command{
Use: "gorm",
Short: "Generate gorm model from database. Example: mpctl gen gorm",
Long: "Generate gorm model from database. Example: mpctl gen gorm",
Run: run,
}
Functions ¶
This section is empty.
Types ¶
type CmdGenParams ¶
type CmdGenParams struct {
DSN *string `yaml:"dsn"`
DB *string `yaml:"db"`
Tables *[]string `yaml:"tables"`
Exclude *[]string `yaml:"exclude"`
Association *[]string `yaml:"association"`
OutPath *string `yaml:"outPath" mapstructure:"out-path"`
OutFile *string `yaml:"outFile" mapstructure:"out-file"`
ModelPkgName *string `yaml:"modelPkgName" mapstructure:"model-pkg-name"`
FieldWithStringTag *[]string `yaml:"fieldWithStringTag" mapstructure:"field-with-string-tag"`
OnlyModel *bool `yaml:"onlyModel" mapstructure:"only-model"`
WithUnitTest *bool `yaml:"withUnitTest" mapstructure:"with-unit-test"`
FieldNullable *bool `yaml:"fieldNullable" mapstructure:"field-nullable"`
FieldWithIndexTag *bool `yaml:"fieldWithIndexTag" mapstructure:"field-with-index-tag"`
FieldWithTypeTag *bool `yaml:"fieldWithTypeTag" mapstructure:"field-with-type-tag"`
FieldSignable *bool `yaml:"fieldSignable" mapstructure:"field-signable"`
}
type CmdParams ¶
type CmdParams struct {
Gen *CmdGenParams `yaml:"gen"`
}
Click to show internal directories.
Click to hide internal directories.