gen

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName = "config.go"

ConfigFileName is the convention filename for configuration.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// OutPath specifies the output directory for generated files.
	// Relative to the model directory. Default: "generated"
	OutPath string

	// IncludeStructs specifies which structs to generate.
	// Supports string names or type instances: []any{"User", &Post{}}
	// If empty, all structs with db tags are generated.
	IncludeStructs []any

	// ExcludeStructs specifies which structs to skip.
	// Supports string names: []any{"BaseModel", "Internal*"}
	ExcludeStructs []any

	// FieldTypeMap maps Go types to field types.
	// Example: map[string]string{"sql.NullTime": "field.Time"}
	FieldTypeMap map[string]string
}

Config defines the code generation configuration. Place this in a file named `config.go` in your model directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL