scaffold

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package scaffold provides solution scaffolding logic for generating skeleton solution YAML files from parameters.

Index

Constants

This section is empty.

Variables

View Source
var ValidFeatures = []string{
	"parameters", "resolvers", "actions", "transforms",
	"validation", "tests", "composition",
}

ValidFeatures are the recognized feature names.

Functions

func BuildYAML

func BuildYAML(name, description, version string, features map[string]bool, providers []string) string

BuildYAML generates solution YAML from scaffold parameters.

func FeatureKeys

func FeatureKeys(features map[string]bool) []string

FeatureKeys returns sorted keys from a features map.

Types

type Options

type Options struct {
	// Name is the solution name (lowercase with hyphens, 3-60 chars).
	Name string `json:"name" doc:"Solution name" maxLength:"60" example:"my-solution"`
	// Description is a brief description of what the solution does.
	Description string `json:"description" doc:"Solution description" maxLength:"200" example:"Deploy to Kubernetes"`
	// Version is the semver version string. Optional for local development.
	Version string `json:"version" doc:"Semantic version" example:"1.0.0"`
	// Features is a map of features to include in the scaffold.
	// Valid keys: parameters, resolvers, actions, transforms, validation, tests, composition.
	Features map[string]bool `json:"features" doc:"Features to include"`
	// Providers lists specific providers to include examples for.
	Providers []string `json:"providers" doc:"Provider-specific examples to include"`
}

Options configures the scaffolding operation.

type Result

type Result struct {
	// YAML is the generated solution YAML content.
	YAML string `json:"yaml" doc:"Generated YAML content"`
	// Filename is the suggested filename for the solution.
	Filename string `json:"filename" doc:"Suggested filename" example:"./my-solution.yaml"`
	// Features lists the features included in the scaffold.
	Features []string `json:"features" doc:"Included features"`
	// NextSteps provides guidance for the user.
	NextSteps []string `json:"nextSteps" doc:"Recommended next steps"`
}

Result contains the output of a scaffolding operation.

func Solution

func Solution(opts Options) *Result

Solution generates a skeleton solution YAML from the given options. If no features are specified, defaults to parameters and resolvers. Version is optional; omit for local development, set for catalog publishing.

Jump to

Keyboard shortcuts

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