templatefiles

package
v1.15.18 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 16 Imported by: 9

Documentation

Index

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 (f *Generator[T]) DetectDrift(ctx context.Context, runData *drift.RunData) (*files.System[*files.StateWithChangeReason], error)

func (*Generator[T]) Name

func (f *Generator[T]) Name() config.Name

func (*Generator[T]) PostGenProcess

func (f *Generator[T]) PostGenProcess(ctx context.Context, fs *files.System[*files.StateWithChangeReason], runData *drift.RunData) error

func (*Generator[T]) Priority

func (f *Generator[T]) Priority() drift.Priority

func (*Generator[T]) Setup

func (f *Generator[T]) Setup(ctx context.Context, runData *drift.RunData) error

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 PostGenProcessor interface {
	PostGenProcess(ctx context.Context, fs *files.System[*files.StateWithChangeReason], runData *drift.RunData) error
}

type PostGenProcessorList

type PostGenProcessorList []PostGenProcessor

func (PostGenProcessorList) PostGenProcess

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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