Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FmtFieldName ¶
fmtFieldName formats a string as a struct key
Example:
fmtFieldName("foo_id")
Output: FooID
Types ¶
type BootstrapInfo ¶
type Helper ¶
type Helper struct {
Cols []*sql.ColumnType
}
type ModelInfo ¶
type ModelInfo struct {
PackageName string
StructName string
ShortStructName string
TableName string
Fields []string
Helper *Helper
Config *config.Config
}
func GenerateStruct ¶
GenerateStruct generates a struct for the given table. func GenerateStruct(db *sql.DB, tableName string, structName string, pkgName string, jsonAnnotation bool, gormAnnotation bool, gureguTypes bool, cfg *config.Config) *ModelInfo {
Click to show internal directories.
Click to hide internal directories.