catalogreplacer

package
v0.0.0-...-463faa5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VariableWorkspace = "workspace"
)

Variables

This section is empty.

Functions

func NewCatalogSubstitutionRegistry

func NewCatalogSubstitutionRegistry(vars []CatalogVariable) substitutions.Registry[string]

Types

type CatalogVariable

type CatalogVariable interface {
	GetSubstitutionPlan() SubstitutionPlan
}

CatalogVariable allows dynamically to replace variables represented with `{{VAR_NAME}}` string.

type CustomCatalogVariable

type CustomCatalogVariable struct {
	Plan SubstitutionPlan
}

CustomCatalogVariable is a variable that can be created on the fly. Just specify the plan of what should be replaced with what data, it implements CatalogVariable.

func (CustomCatalogVariable) GetSubstitutionPlan

func (c CustomCatalogVariable) GetSubstitutionPlan() SubstitutionPlan

type SubstitutionPlan

type SubstitutionPlan struct {
	From string
	To   string
}

SubstitutionPlan defines an intent to replace `from` with `to`.

Jump to

Keyboard shortcuts

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