Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultManager = NewGeneratorManager()
DefaultManager is the default instance of the generator manager
Functions ¶
This section is empty.
Types ¶
type CommonGenerator ¶
func NewGenerator ¶
func NewGenerator(flagset *flagset.Flagset, UnsupportedFlagTypes map[flagset.FlagType]bool) *CommonGenerator
NewGenerator creates a new generator
func (*CommonGenerator) GenerateFile ¶
type GeneratorCreator ¶
GeneratorCreator is a function that creates a generator command
type GeneratorInfo ¶
type GeneratorInfo struct { Name string Description string Stability Stability Creator GeneratorCreator }
GeneratorInfo contains metadata about a generator
type GeneratorManager ¶
type GeneratorManager struct {
// contains filtered or unexported fields
}
GeneratorManager maintains a registry of available generators
func NewGeneratorManager ¶
func NewGeneratorManager() *GeneratorManager
NewGeneratorManager creates a new generator manager
func (*GeneratorManager) GetAll ¶
func (m *GeneratorManager) GetAll() map[string]GeneratorInfo
GetAll returns all registered generators
func (*GeneratorManager) GetCommands ¶
func (m *GeneratorManager) GetCommands() []*cobra.Command
GetCommands returns cobra commands for all registered generators
func (*GeneratorManager) PrintGeneratorsTable ¶
func (m *GeneratorManager) PrintGeneratorsTable() error
PrintGeneratorsTable prints a table of all available generators with their stability
func (*GeneratorManager) Register ¶
func (m *GeneratorManager) Register(cmdCreator func() *cobra.Command)
Register adds a generator to the registry
type TemplateData ¶
type TemplateData struct { CommonGenerator Params[any] }
Click to show internal directories.
Click to hide internal directories.