foundry

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CastingItem

type CastingItem struct {
	// The particular casting implementation.
	Casting casting.Casting

	// The toolers for the particular casting.
	Toolers []tooler.Tooler
}

Defines a single casting item in the registry.

type Foundry

type Foundry struct {
	// Config for loading the casting configuration.
	Config config.Config

	// Patchers for applying patches to generated materials, keyed by patch type.
	Patchers map[string]patch.Patch

	// Logger for logging.
	Logger *slog.Logger

	// Registry for the different deployments.
	Registry *Registry

	// Moldings for the different molding kinds.
	Moldings map[v1alpha1.MoldingKind]molding.Molding

	// InfrastructureGenerator for generating infrastructure-as-code manifests.
	InfrastructureGenerator infrastructure.Generator
}

func New

func New(logger *slog.Logger) (*Foundry, error)

func (*Foundry) Cast

func (foundry *Foundry) Cast(ctx context.Context, config v1alpha1.Casting, poursPath string) error

func (*Foundry) Forge

func (foundry *Foundry) Forge(ctx context.Context, config v1alpha1.Casting, path string, poursWriterOpts *writer.Options) error

func (*Foundry) Gauge

func (foundry *Foundry) Gauge(ctx context.Context, config v1alpha1.Casting) error

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(logger *slog.Logger) (*Registry, error)

func (*Registry) Casting

func (registry *Registry) Casting(deployment v1alpha1.TypeDeployment) (casting.Casting, error)

func (*Registry) CastingItems

func (registry *Registry) CastingItems() map[v1alpha1.TypeDeployment]CastingItem

func (*Registry) Toolers

func (registry *Registry) Toolers(deployment v1alpha1.TypeDeployment) ([]tooler.Tooler, error)

Jump to

Keyboard shortcuts

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