gorm

package
v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

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"`
}

type DBType

type DBType string

DBType database type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL