Documentation ¶
Index ¶
- func NewModule[T config.TemplateConfig](newModuleConfig NewModuleConfig[T]) fx.Option
- type Generator
- func (f *Generator[T]) AddMutator(mutator templatemutator.Mutator[T])
- func (f *Generator[T]) DetectDrift(ctx context.Context, runData *drift.RunData) (*files.System[*files.StateWithChangeReason], error)
- func (f *Generator[T]) Name() config.Name
- func (f *Generator[T]) PostGenProcess(ctx context.Context, fs *files.System[*files.StateWithChangeReason], ...) error
- func (f *Generator[T]) Priority() drift.Priority
- func (f *Generator[T]) Setup(ctx context.Context, runData *drift.RunData) error
- type GenericConfigMutator
- type NewModuleConfig
- type PostGenProcessor
- type PostGenProcessorList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewModule ¶
func NewModule[T config.TemplateConfig](newModuleConfig NewModuleConfig[T]) fx.Option
Types ¶
type Generator ¶
type Generator[T config.TemplateConfig] struct { // contains filtered or unexported fields }
func (*Generator[T]) AddMutator ¶
func (f *Generator[T]) AddMutator(mutator templatemutator.Mutator[T])
func (*Generator[T]) DetectDrift ¶
func (*Generator[T]) PostGenProcess ¶
type GenericConfigMutator ¶
type GenericConfigMutator[T config.TemplateConfig] struct { TemplateName string TemplateStr string MutateFunc func(ctx context.Context, renderedTemplate string, cfg T) (T, error) }
func (*GenericConfigMutator[T]) Mutate ¶
func (g *GenericConfigMutator[T]) Mutate(ctx context.Context, runData *drift.RunData, _ stateloader.StateLoader, cfg T) (T, error)
type NewModuleConfig ¶
type NewModuleConfig[T config.TemplateConfig] struct { Name config.Name Files map[string]string Priority drift.Priority Decoder config.Decoder[T] Setup syncer.SetupSyncer PostGenProcessor PostGenProcessor }
type PostGenProcessor ¶
type PostGenProcessorList ¶
type PostGenProcessorList []PostGenProcessor
func (PostGenProcessorList) PostGenProcess ¶
func (p PostGenProcessorList) PostGenProcess(ctx context.Context, fs *files.System[*files.StateWithChangeReason], runData *drift.RunData) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.