Documentation
¶
Index ¶
- func RenderInspectionReport(report InspectionReport, format string) (string, error)
- func RenderInspectionStarterConfig(cfg config.Config, report InspectionReport) string
- func WritePostgresDBInit(cfg config.Config, g *gen.Generator) error
- func WriteSQLiteDBInit(cfg config.Config, g *gen.Generator) error
- type InspectionColumnUsage
- type InspectionObject
- type InspectionRecommendation
- type InspectionReport
- type InspectionTypeFinding
- type InspectionTypeKind
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderInspectionReport ¶ added in v1.1.0
func RenderInspectionReport(report InspectionReport, format string) (string, error)
RenderInspectionReport renders the inspection report in the requested format.
func RenderInspectionStarterConfig ¶ added in v1.1.0
func RenderInspectionStarterConfig(cfg config.Config, report InspectionReport) string
RenderInspectionStarterConfig renders a versioned TOML starter config using the provided PostgreSQL connection settings and inspection recommendations.
Types ¶
type InspectionColumnUsage ¶ added in v1.1.0
type InspectionObject ¶ added in v1.1.0
type InspectionRecommendation ¶ added in v1.1.0
type InspectionRecommendation string
const ( InspectionRecommendationNone InspectionRecommendation = "" InspectionRecommendationTypeMap InspectionRecommendation = "type_map" InspectionRecommendationGenerate InspectionRecommendation = "generate" InspectionRecommendationManual InspectionRecommendation = "manual" )
type InspectionReport ¶ added in v1.1.0
type InspectionReport struct {
Dialect config.DatabaseDialect
Objects []InspectionObject
Findings []InspectionTypeFinding
}
type InspectionTypeFinding ¶ added in v1.1.0
type InspectionTypeFinding struct {
DBType string
Kind InspectionTypeKind
BaseDBType string
CurrentMapping string
MappingSource string
SuggestedGoType string
Recommendation InspectionRecommendation
SuggestedImportPath string
SuggestedImportPackage string
DomainBaseType string
EnumLabels []string
Usages []InspectionColumnUsage
Note string
}
type InspectionTypeKind ¶ added in v1.1.0
type InspectionTypeKind string
const ( InspectionTypeEnum InspectionTypeKind = "enum" InspectionTypeDomain InspectionTypeKind = "domain" InspectionTypeEnumArray InspectionTypeKind = "enum_array" InspectionTypeDomainArray InspectionTypeKind = "domain_array" InspectionTypeCustom InspectionTypeKind = "custom" InspectionTypeCustomArray InspectionTypeKind = "custom_array" )
Click to show internal directories.
Click to hide internal directories.