Documentation
¶
Index ¶
Constants ¶
View Source
const CurrentConfigVersion = 1
Variables ¶
This section is empty.
Functions ¶
func RenderVersionedTOML ¶ added in v1.2.0
RenderVersionedTOML renders a canonical ConfigVersion=1 TOML representation of the effective config. It is intended for migration and normalization, not for emitting the commented sample config.
func SampleTOML ¶
func SampleTOML() string
Types ¶
type Config ¶
type Config struct {
DatabaseDialect DatabaseDialect
OutPath string
OutPackagePath string
ImportPackagePaths []string
Objects *[]string
JSONTagOverridesByTable map[string]map[string]string
ExtraFields map[string][]ExtraField
TypeMap map[string]string
GeneratedTypes GeneratedTypesConfig
DbInit GenerateDbInitConfig
NamingStrategy schema.NamingStrategy `toml:"-"`
CleanUp bool
DbHost string
DbPort int
DbName string
DbUser string
DbPassword string
DbSSLMode bool
SQLiteDBPath string
// contains filtered or unexported fields
}
type DatabaseDialect ¶
type DatabaseDialect string
const ( PostgreSQL DatabaseDialect = "postgresql" SQLite DatabaseDialect = "sqlite" )
type ExtraField ¶
type GenerateDbInitConfig ¶
type GeneratedTypesConfig ¶
type GeneratedTypesConfig struct {
PackageName string
RelativePath string
PackagePath string
TypeMap map[string]string
}
func (GeneratedTypesConfig) HasEntries ¶
func (g GeneratedTypesConfig) HasEntries() bool
func (GeneratedTypesConfig) Validate ¶
func (g GeneratedTypesConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.