Documentation
¶
Overview ¶
Package create prepares scaffold-backed stack manifests without deploying resources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
File, Target, Name, Template, Ref string
Imports, Components []string
Values map[string]any
Defaults bool
}
Options selects a scaffold and its stack-specific inputs.
type OutputKind ¶
type OutputKind int
OutputKind classifies a file a plan writes.
const ( // OutputManifest is the requested stack manifest. OutputManifest OutputKind = iota // OutputFile is any other file the scaffold renders. OutputFile // OutputRecord is the Atmos-owned generation record. OutputRecord )
type Plan ¶
type Plan struct {
Root, Manifest string
// Target is the project-relative directory destination; empty in file mode.
Target string
// Manifests lists discoverable generated stack manifests.
Manifests []string
Generation *generatorui.CreationPlan
Hooks map[string]hooks.Hook
// contains filtered or unexported fields
}
Plan contains the fully rendered files and the scaffold hooks that accompany them.
func (*Plan) Apply ¶
Apply runs scaffold hooks around exclusive writes of exactly the previewed bytes.
func (*Plan) Outputs ¶
Outputs lists every file the plan writes, as project-relative slash paths, in write order.
func (*Plan) Preview ¶
Preview prints what Apply would do. Stdout carries file previews, each introduced by a comment naming its path and separated from the next by `---`, so it stays pipeable. Files may contain non-YAML content, so the stream is not guaranteed to be valid YAML. The generation record is only mentioned on stderr: it holds every answer and is not worth dumping.
type Renderer ¶
type Renderer interface {
SetEdition(string)
PlanCreationQuiet(*templates.Configuration, string, bool, map[string]any) (*generatorui.CreationPlan, error)
}
Renderer is the shared scaffold questionnaire and rendering API. Stack create reports its own result, so it uses the quiet variant that omits the renderer's dry-run report.