Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryFieldInfo ¶
type FactoryFieldInfo struct {
Name string
Type string
GoZero string
DefaultValue string
OptionName string
IsFK bool
IsTimestamp bool
IsID bool
IsAutoManaged bool
}
FactoryFieldInfo contains metadata for generating a factory field
type FieldAnalyzer ¶
type FieldAnalyzer struct {
// contains filtered or unexported fields
}
FieldAnalyzer determines appropriate default values for factory fields
func NewFieldAnalyzer ¶
func NewFieldAnalyzer(dbType string) *FieldAnalyzer
NewFieldAnalyzer creates a new field analyzer.
func (*FieldAnalyzer) AnalyzeField ¶
func (fa *FieldAnalyzer) AnalyzeField(field models.GeneratedField, tableName string) FactoryFieldInfo
AnalyzeField returns default value expression and metadata for a field
Click to show internal directories.
Click to hide internal directories.