Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator interface {
// Generate generates files from the schema
Generate(schema *definition.Schema, opts Options) error
// Name returns the generator name
Name() string
// Description returns a description of what this generator produces
Description() string
}
Generator is the interface that all schema generators must implement
type MigrationFile ¶
MigrationFile represents a generated migration file
type Options ¶
type Options struct {
// OutputDir is the directory where generated files will be written
OutputDir string
// Dialect specifies the database dialect (postgres, mysql, sqlite, etc.)
Dialect string
// PackageName is the Go package name for generated code
PackageName string
// Overwrite determines if existing files should be overwritten
Overwrite bool
// Verbose enables verbose output
Verbose bool
// Custom contains generator-specific options
Custom map[string]interface{}
}
Options contains common options for all generators
type Result ¶
type Result struct {
Files []MigrationFile
Message string
Errors []error
}
Result represents the result of a generation operation
Click to show internal directories.
Click to hide internal directories.