Documentation
¶
Index ¶
- func BuildDriftItems(result *container.ReconciliationCheckResult, ...) []splitpane.Item
- func HintForContext(ctx DriftContext) string
- func HumanReadableAction(action container.ReconciliationAction) string
- func HumanReadableDriftType(t container.ReconciliationType) string
- func HumanReadableDriftTypeLabel(t container.ReconciliationType) string
- func SortDriftItems(items []splitpane.Item)
- type DriftContext
- type DriftDetailsRenderer
- type DriftDetectedMsg
- type DriftFooterRenderer
- type DriftItem
- func (d *DriftItem) CanDrillDown() bool
- func (d *DriftItem) GetAction() string
- func (d *DriftItem) GetChildren() []splitpane.Item
- func (d *DriftItem) GetDepth() int
- func (d *DriftItem) GetID() string
- func (d *DriftItem) GetIcon(selected bool) string
- func (d *DriftItem) GetIconStyled(s *styles.Styles, styled bool) string
- func (d *DriftItem) GetItemType() string
- func (d *DriftItem) GetName() string
- func (d *DriftItem) GetParentID() string
- func (d *DriftItem) IsExpandable() bool
- type DriftItemType
- type DriftSectionGrouper
- type HeadlessDriftPrinter
- type ReconciliationCompleteMsg
- type ReconciliationErrorMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDriftItems ¶
func BuildDriftItems( result *container.ReconciliationCheckResult, instanceState *state.InstanceState, ) []splitpane.Item
BuildDriftItems creates DriftItems from a ReconciliationCheckResult. instanceState is optional - when provided, it enables resource state lookup for displaying computed fields/outputs.
func HintForContext ¶
func HintForContext(ctx DriftContext) string
HintForContext returns the appropriate hint text for the given drift context.
func HumanReadableAction ¶
func HumanReadableAction(action container.ReconciliationAction) string
HumanReadableAction converts a ReconciliationAction to a human-readable label.
func HumanReadableDriftType ¶
func HumanReadableDriftType(t container.ReconciliationType) string
HumanReadableDriftType converts a ReconciliationType to a short uppercase label.
func HumanReadableDriftTypeLabel ¶
func HumanReadableDriftTypeLabel(t container.ReconciliationType) string
HumanReadableDriftTypeLabel converts a ReconciliationType to a human-readable label.
func SortDriftItems ¶
SortDriftItems sorts items alphabetically by name.
Types ¶
type DriftContext ¶
type DriftContext string
DriftContext determines the contextual hints shown in the footer.
const ( // DriftContextStage is used when drift is detected during the stage command. // Hint: "Use --skip-drift-check to skip drift detection" DriftContextStage DriftContext = "stage" // DriftContextDeployStage is used when drift is detected during the staging phase of deploy --stage. // Hint: "Use --skip-drift-check to skip drift detection" DriftContextDeployStage DriftContext = "deploy_stage" // DriftContextDeploy is used when drift is detected during deployment (409 response). // Hint: "Use --force to override drift check" DriftContextDeploy DriftContext = "deploy" // DriftContextDestroy is used when drift is detected during destroy (409 response). // Hint: "Use --force to override drift check" DriftContextDestroy DriftContext = "destroy" )
type DriftDetailsRenderer ¶
type DriftDetailsRenderer struct {
MaxExpandDepth int
}
DriftDetailsRenderer implements splitpane.DetailsRenderer for drift review UI.
func (*DriftDetailsRenderer) RenderDetails ¶
func (r *DriftDetailsRenderer) RenderDetails(item splitpane.Item, width int, s *styles.Styles) string
RenderDetails renders the right pane content for a selected drift item.
type DriftDetectedMsg ¶
type DriftDetectedMsg struct {
// ReconciliationResult contains the full drift/interrupted state detection result.
ReconciliationResult *container.ReconciliationCheckResult
// Message explains what was detected.
Message string
// InstanceID is the ID of the blueprint instance.
InstanceID string
// ChangesetID is the ID of the changeset (for continuing deployment after reconciliation).
ChangesetID string
// InstanceState is the current instance state (for displaying computed fields).
InstanceState *state.InstanceState
}
DriftDetectedMsg is sent when drift is detected during staging or deployment. For staging: triggered by the DriftDetected streaming event. For deployment: triggered by a 409 DriftBlockedResponse.
type DriftFooterRenderer ¶
type DriftFooterRenderer struct {
}
DriftFooterRenderer implements splitpane.FooterRenderer for drift review UI.
func (*DriftFooterRenderer) RenderFooter ¶
RenderFooter renders the drift review footer with options and contextual hint.
type DriftItem ¶
type DriftItem struct {
Type DriftItemType
Name string
ResourceType string // For resources: the resource type (e.g., "aws/s3/bucket")
ChildPath string // Path to child blueprint (e.g., "childA" or "childA.childB")
DriftType container.ReconciliationType
// Changes for resources
ResourceResult *container.ResourceReconcileResult
// ResourceState from instance state (for computed fields/outputs)
ResourceState *state.ResourceState
// Changes for links
LinkResult *container.LinkReconcileResult
Recommended container.ReconciliationAction
// For hierarchical display
Depth int
ParentChild string
// Children for child blueprint summary items
Children []*DriftItem
}
DriftItem represents a resource or link with drift for the split pane.
func (*DriftItem) CanDrillDown ¶
CanDrillDown returns true if the item can be drilled into.
func (*DriftItem) GetChildren ¶
GetChildren returns child items when expanded.
func (*DriftItem) GetIconStyled ¶
GetIconStyled returns a styled icon for the item.
func (*DriftItem) GetItemType ¶
GetItemType returns the type for section grouping.
func (*DriftItem) GetParentID ¶
GetParentID returns the parent item ID.
func (*DriftItem) IsExpandable ¶
IsExpandable returns true if the item can be expanded in-place.
type DriftItemType ¶
type DriftItemType string
DriftItemType represents the type of drift item.
const ( DriftItemTypeResource DriftItemType = "resource" DriftItemTypeLink DriftItemType = "link" DriftItemTypeChild DriftItemType = "child" )
type DriftSectionGrouper ¶
type DriftSectionGrouper struct {
MaxExpandDepth int
}
DriftSectionGrouper implements splitpane.SectionGrouper for drift review UI.
func (*DriftSectionGrouper) GroupItems ¶
func (g *DriftSectionGrouper) GroupItems( items []splitpane.Item, isExpanded func(id string) bool, ) []splitpane.Section
GroupItems organizes drift items into sections: Resources, Links, Child Blueprints.
type HeadlessDriftPrinter ¶
type HeadlessDriftPrinter struct {
// contains filtered or unexported fields
}
HeadlessDriftPrinter prints drift information in headless mode.
func NewHeadlessDriftPrinter ¶
func NewHeadlessDriftPrinter(printer *headless.Printer, context DriftContext) *HeadlessDriftPrinter
NewHeadlessDriftPrinter creates a new headless drift printer.
func (*HeadlessDriftPrinter) PrintDriftDetected ¶
func (p *HeadlessDriftPrinter) PrintDriftDetected(result *container.ReconciliationCheckResult)
PrintDriftDetected prints the full drift detection output.
type ReconciliationCompleteMsg ¶
type ReconciliationCompleteMsg struct {
// InstanceID is the ID of the blueprint instance that was reconciled.
InstanceID string
// ResourcesUpdated is the number of resources that were successfully updated.
ResourcesUpdated int
// LinksUpdated is the number of links that were successfully updated.
LinksUpdated int
}
ReconciliationCompleteMsg is sent after successful reconciliation.
type ReconciliationErrorMsg ¶
type ReconciliationErrorMsg struct {
// Err is the error that occurred during reconciliation.
Err error
}
ReconciliationErrorMsg is sent when reconciliation fails.