input

package
v0.86.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToJSONSafe

func ConvertToJSONSafe(data any) (any, error)

ConvertToJSONSafe recursively converts map[interface{}]interface{} to map[string]any.

func FindChangesetInData

func FindChangesetInData(changesets any, changesetName, inputFileName string) (any, error)

FindChangesetInData finds a changeset in array format.

func FindWorkspaceRoot

func FindWorkspaceRoot() (string, error)

FindWorkspaceRoot finds the root of the workspace by looking for the domains directory.

func Generate

func Generate(opts GenerateOptions) (string, error)

Generate resolves the inputs file and outputs the result.

func PrepareInputForRunByIndex

func PrepareInputForRunByIndex(inputFileName string, index int, dom domain.Domain, envKey string) (string, error)

PrepareInputForRunByIndex sets the DURABLE_PIPELINE_INPUT environment variable by selecting the changeset at the specified index position. Returns the changeset name.

func PrepareInputForRunByName

func PrepareInputForRunByName(inputFileName, changesetName string, dom domain.Domain, envKey string) error

PrepareInputForRunByName reads a YAML file, extracts the payload for the specified changeset, sets it as the DURABLE_PIPELINE_INPUT environment variable in JSON format, and returns nil.

func ResolveChangesetConfig

func ResolveChangesetConfig(valueNode *yaml.Node, csName string, resolver resolvers.ConfigResolver) (any, error)

ResolveChangesetConfig resolves the configuration for a changeset using either a registered resolver or keeping the original payload.

func ResolveDurablePipelineYamlPath

func ResolveDurablePipelineYamlPath(inputFileName string, dom domain.Domain, envKey string) (string, error)

ResolveDurablePipelineYamlPath resolves a YAML file path for durable pipelines. It only accepts filenames (not full paths) and resolves them to the appropriate durable_pipelines/inputs directory based on the domain and environment.

func SetChangesetEnvironmentVariable

func SetChangesetEnvironmentVariable(changesetName string, changesetData any, inputFileName string) error

SetChangesetEnvironmentVariable sets the DURABLE_PIPELINE_INPUT environment variable.

func YamlNodeToAny

func YamlNodeToAny(node *yaml.Node) any

YamlNodeToAny converts a yaml.Node to a generic any value.

Types

type ChangesetItem

type ChangesetItem struct {
	Name string
	Data any
}

ChangesetItem represents a single changeset in order.

func GetAllChangesetsInOrder

func GetAllChangesetsInOrder(changesets any, inputFileName string) ([]ChangesetItem, error)

GetAllChangesetsInOrder returns all changesets in order from array format.

type DurablePipelineYAML

type DurablePipelineYAML struct {
	Environment string
	Domain      string
	Changesets  any
}

DurablePipelineYAML represents the structure of a durable pipeline YAML input file.

func ParseDurablePipelineYAML

func ParseDurablePipelineYAML(inputFileName string, dom domain.Domain, envKey string) (*DurablePipelineYAML, error)

ParseDurablePipelineYAML parses and validates a durable pipeline YAML file.

type GenerateOptions

type GenerateOptions struct {
	InputsFileName  string
	Domain          domain.Domain
	EnvKey          string
	Registry        *cs.ChangesetsRegistry
	ResolverManager *resolvers.ConfigResolverManager
	FormatAsJSON    bool
	OutputPath      string // empty = print to stdout
}

GenerateOptions configures the input-generate operation.

Jump to

Keyboard shortcuts

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