Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactPayload ¶ added in v0.14.0
type ArtifactPayload interface {
ArtifactPayload() (sections []sections.RenderedSection, ctx any)
}
ArtifactPayload is implemented by cmd-level data structs that join the v1 artifact render path (currently: postmortem). It lets the render pipeline extract the pre-merged section list and the per-template ctx without coupling to cmd-specific types.
type Options ¶
type Options struct {
Out string
Stdout bool
Force bool
DryRun bool
Default string
TemplatePath string // optional: read template from this file path instead of the embedded/loader chain
JSON bool // emit the template data as JSON instead of rendering the template
Quiet bool // suppress informational messages (the "wrote <file>" line, dry-run notes)
// BootstrapJSON controls --json shape for commands that haven't migrated
// to a sections manifest. When true (the default for legacy commands),
// the rendered markdown is wrapped in a bootstrap envelope
// `{meta: <data>, sections: [{id:"body", title:<H1>, type:"text",
// required:true, body:<rendered markdown>}]}` so every command speaks
// the same {meta, sections} JSON contract. When false (postmortem), the
// caller has already shaped `data` as {meta, sections} itself and JSON
// short-circuits straight to MarshalIndent without rendering markdown.
BootstrapJSON bool
// RenderArtifact switches the render path from Go-template execution
// to the v1 YAML artifact format introduced in v0.14.0. When true,
// the loader resolves <name>.yaml via LoadArtifactBytes, ParseArtifact
// builds an Artifact, and sections.RenderArtifact composes the
// markdown. `data` must implement ArtifactPayload (returning the
// pre-merged section list and the template ctx).
RenderArtifact bool
}
Click to show internal directories.
Click to hide internal directories.