Documentation
¶
Overview ¶
Package app provides CLI wiring and process setup for gormdb2struct.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIConfig ¶
type CLIConfig struct {
Logging LoggingConfig `embed:""`
ConfigPath string `arg:"" optional:"" name:"config" help:"Path to the TOML configuration file." type:"path"`
}
CLIConfig defines the top-level command-line contract.
type GenerateConfigSampleCmd ¶
type GenerateConfigSampleCmd struct {
Out string `name:"out" short:"o" default:"gormdb2struct-sample.toml" help:"Path to write the sample TOML config." type:"path"`
}
GenerateConfigSampleCmd writes a starter TOML configuration file.
type InspectCmd ¶ added in v1.1.0
type InspectCmd struct {
Logging LoggingConfig `embed:""`
ConfigPath string `arg:"" name:"config" help:"Path to the TOML configuration file." type:"path"`
Format string `name:"format" enum:"text,toml" default:"text" help:"Output format for the inspection report."`
}
InspectCmd analyzes a schema and recommends missing type mappings.
type InspectPostgreSQLCmd ¶ added in v1.1.0
type InspectPostgreSQLCmd struct {
Logging LoggingConfig `embed:""`
Host string `name:"host" required:"" help:"PostgreSQL host."`
Port int `name:"port" default:"5432" help:"PostgreSQL port."`
Database string `name:"database" required:"" help:"PostgreSQL database name."`
User string `name:"user" required:"" help:"PostgreSQL user."`
Password string `name:"password" help:"PostgreSQL password."`
PasswordEnv string `name:"password-env" help:"Environment variable that contains the PostgreSQL password."`
PasswordStdin bool `name:"password-stdin" help:"Read the PostgreSQL password from stdin."`
PasswordPrompt bool `name:"password-prompt" help:"Prompt securely for the PostgreSQL password."`
SSLMode bool `name:"sslmode" help:"Require SSL for the PostgreSQL connection."`
Objects []string `name:"object" help:"Database object to inspect. Repeat to limit the inspection scope."`
ImportPackagePaths []string `` /* 152-byte string literal not displayed */
Out string `` /* 149-byte string literal not displayed */
OutPath string `name:"out-path" default:"./generated" help:"OutPath to use in TOML output."`
OutPackagePath string `name:"out-package-path" default:"" help:"OutPackagePath to use in TOML output."`
GeneratedTypesPackage string `` /* 129-byte string literal not displayed */
GeneratedTypesPath string `` /* 134-byte string literal not displayed */
}
InspectPostgreSQLCmd analyzes a PostgreSQL schema directly from CLI connection flags.
type LoggingConfig ¶
type LoggingConfig struct {
Level string `name:"logging.level" enum:"debug,info,warn,error" default:"info" help:"Log level." group:"logging"`
}
LoggingConfig defines CLI-controlled logging options.
Click to show internal directories.
Click to hide internal directories.