Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultOutputFileName is the default output file name for the generated model name functions.
DefaultOutputFileName = "zz_generated.model_name.go"
)
Variables ¶
This section is empty.
Functions ¶
func NewGenerator ¶
func NewGenerator(opts Options) generation.Generator
NewGenerator builds a new model name generator.
Types ¶
type Options ¶
type Options struct {
// Disabled indicates whether the model name generator is enabled or not.
// This defaults to false as the model name generator is enabled by default.
Disabled bool
// HeaderFilePath is the path to the file containing the boilerplate header text.
// When omitted, no header is added to the generated files.
HeaderFilePath string
// OutputFileName is the file name to use for writing the generated model
// names to. This file will be created for each group version.
// When omitted, this will default to `zz_generated.model_name.go`.
OutputFileName string
// Verify determines whether the generator should verify the content instead
// of updating the generated file.
Verify bool
// GlobalParser is the parser for the global package.
// This loads all packages found in the base directory.
GlobalParser *parser.Parser
// Universe is the universe for the global package.
Universe types.Universe
}
Options contains the configuration required for the model name generator.
Click to show internal directories.
Click to hide internal directories.