Documentation ¶
Index ¶
- Variables
- func GenerateModels(g GenExecutor, gormDB *gorm.DB, driver DBDriver, schema string) error
- func GenerateTsModels(goModelDir, goOutFile, tsDir, tsFile, tsOutFile string, cfg GenerateConfig) error
- func RemoveGenDirs(queryOutPath, modelOutPath string) error
- type DBDriver
- type GenExecutor
- type GenerateConfig
- type LanguageType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMustSetSchema = errors.New("model-gen: 'schema' field must be set when 'driver' field is set to 'postgres'") ErrQueryTableNames = errors.New("model-gen: query table name error") ErrQueryColumnNames = errors.New("model-gen: query column name error") ErrQueryForeignKeys = errors.New("model-gen: query foreign key error") )
Functions ¶
func GenerateModels ¶
func GenerateTsModels ¶
func GenerateTsModels(goModelDir, goOutFile, tsDir, tsFile, tsOutFile string, cfg GenerateConfig) error
func RemoveGenDirs ¶
Types ¶
type GenExecutor ¶
type GenerateConfig ¶
type LanguageType ¶
type LanguageType string
var ( GoLanguageType LanguageType = "go" TsLanguageType LanguageType = "ts" )
Click to show internal directories.
Click to hide internal directories.