Documentation ¶
Index ¶
- Variables
- func FmtTemplates(outputLoc string) error
- func GoimportsInstallIfNeeded() error
- func InstallGoimports() error
- func IsGoimportsInstalled() bool
- func LoadSQL(paths ...string) ([]*models.Table, error)
- func RenderTemplates(tables []*models.Table, templatesLoc, outputLoc string, ...) error
- func RenderWithTemplates(fs embed.FS, tables []*models.Table, outputLoc string, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Helpers = template.FuncMap{ "has_primary_key": hasPrimaryKey, "has_autoinc": hasAutoIncrementingKey, "primary_autoinc_column": primaryAutoIncColumn, "autoinc_column": autoIncColumn, "non_autoinc_columns": nonAutoIncColumns, "lcfirst": xstrings.FirstRuneToLower, "identity_columns": identityColumns, "non_identity_columns": nonIdentityColumns, "structify": structify, "enum_columns": enumColumns, "unique_column_keys": uniqueColumnKeys, "sorted_columns": sortedColumns, "get_type": getType, "get_tags": getTags, }
Helpers defines the map of functions exposed to generation templates
Functions ¶
func FmtTemplates ¶ added in v0.0.9
func GoimportsInstallIfNeeded ¶ added in v0.0.8
func GoimportsInstallIfNeeded() error
func InstallGoimports ¶ added in v0.0.8
func InstallGoimports() error
func IsGoimportsInstalled ¶ added in v0.0.8
func IsGoimportsInstalled() bool
func RenderTemplates ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.