{"modulePath":"github.com/newstack-cloud/deploy-cli-sdk","version":"v0.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package deployui\n\nPackage deployui provides drift item types for the deploy command. All core drift types are defined in the driftui package and re-exported here for backwards compatibility.\n\n## Constants\n\n```go\nconst (\n\tItemTypeResource = shared.ItemTypeResource\n\tItemTypeChild    = shared.ItemTypeChild\n\tItemTypeLink     = shared.ItemTypeLink\n\n\tActionCreate   = shared.ActionCreate\n\tActionUpdate   = shared.ActionUpdate\n\tActionDelete   = shared.ActionDelete\n\tActionRecreate = shared.ActionRecreate\n\tActionNoChange = shared.ActionNoChange\n\tActionInspect  = shared.ActionInspect\n)\n```\nRe-export constants for backwards compatibility.\n\n```go\nconst (\n\tDriftItemTypeResource = driftui.DriftItemTypeResource\n\tDriftItemTypeLink     = driftui.DriftItemTypeLink\n\tDriftItemTypeChild    = driftui.DriftItemTypeChild\n)\n```\nConstant aliases for backwards compatibility\n\n```go\nconst MaxExpandDepth = 2\n```\nMaxExpandDepth is the maximum nesting depth for expanding child blueprints.\n\n## Variables\n\n```go\nvar BuildDriftItems = driftui.BuildDriftItems\n```\nBuildDriftItems creates DriftItems from a ReconciliationCheckResult.\n\n```go\nvar HumanReadableAction = driftui.HumanReadableAction\n```\nHumanReadableAction converts a ReconciliationAction to a human-readable label.\n\n```go\nvar HumanReadableDriftType = driftui.HumanReadableDriftType\n```\nHumanReadableDriftType converts a ReconciliationType to a short uppercase label.\n\n```go\nvar HumanReadableDriftTypeLabel = driftui.HumanReadableDriftTypeLabel\n```\nHumanReadableDriftTypeLabel converts a ReconciliationType to a human-readable label.\n\n```go\nvar SortDriftItems = driftui.SortDriftItems\n```\nSortDriftItems sorts items alphabetically by name.\n\n## Functions\n\n```go\nfunc BuildInstanceHierarchy(root *state.InstanceState, rootName string) []splitpane.Item\n```\nBuildInstanceHierarchy builds a flat list of ExportsInstanceItems from the instance state hierarchy, suitable for display in the exports view.\n\n```go\nfunc BuildInstancePath(state *EventProcessorState, parentInstanceID, childName string) string\n```\nBuildInstancePath builds a path from instance ID to the child name. For root instance resources, returns just the name. For nested children, returns a path like \"parentChild/childName\".\n\n```go\nfunc BuildParentChain(state *EventProcessorState, startInstanceID string) []string\n```\nBuildParentChain constructs the path parts from the root to the given instance ID.\n\n```go\nfunc BuildResourcePath(state *EventProcessorState, instanceID, resourceName string) string\n```\nBuildResourcePath builds a path for a resource based on its instance ID. For root instance resources, returns just the resource name. For nested resources, returns a path like \"parentChild/childName/resourceName\".\n\n```go\nfunc ExtractResourceAFromLinkName(linkName string) string\n```\nExtractResourceAFromLinkName extracts the first resource name from a link name (format: \"resourceA::resourceB\").\n\n```go\nfunc ExtractResourceBFromLinkName(linkName string) string\n```\nExtractResourceBFromLinkName extracts the second resource name from a link name (format: \"resourceA::resourceB\").\n\n```go\nfunc GetChildChanges(state *EventProcessorState, childName string) *changes.BlueprintChanges\n```\nGetChildChanges returns the blueprint changes for a child, if available.\n\n```go\nfunc InstanceStateHasExports(instanceState *state.InstanceState) bool\n```\nInstanceStateHasExports checks if an instance state has any exports (either directly or in child blueprints).\n\n```go\nfunc InstanceStatusToAction(status core.InstanceStatus) string\n```\nInstanceStatusToAction converts an instance status to a human-readable action string.\n\n```go\nfunc IsFailedInstanceStatus(status core.InstanceStatus) bool\n```\nIsFailedInstanceStatus returns true if the child blueprint is in a failed state.\n\n```go\nfunc IsFailedLinkStatus(status core.LinkStatus) bool\n```\nIsFailedLinkStatus returns true if the link is in a failed state.\n\n```go\nfunc IsFailedResourceStatus(status core.ResourceStatus) bool\n```\nIsFailedResourceStatus returns true if the resource is in a failed state.\n\n```go\nfunc IsFailedStatus(status core.InstanceStatus) bool\n```\nIsFailedStatus returns true if the instance status should result in a non-zero exit code. This includes failed operations and rollback complete states (since a rollback means the original operation failed). Used to determine exit code for CI/CD pipelines.\n\n```go\nfunc IsInProgressInstanceStatus(status core.InstanceStatus) bool\n```\nIsInProgressInstanceStatus returns true if the instance status indicates the child blueprint is still being processed (not in a terminal state).\n\n```go\nfunc IsInProgressLinkStatus(status core.LinkStatus) bool\n```\nIsInProgressLinkStatus returns true if the link status indicates the link is still being processed (not in a terminal state).\n\n```go\nfunc IsInProgressResourceStatus(status core.ResourceStatus) bool\n```\nIsInProgressResourceStatus returns true if the resource status indicates the resource is still being processed (not in a terminal state).\n\n```go\nfunc IsInterruptedInstanceStatus(status core.InstanceStatus) bool\n```\nIsInterruptedInstanceStatus returns true if the child blueprint was interrupted.\n\n```go\nfunc IsInterruptedLinkStatus(status core.LinkStatus) bool\n```\nIsInterruptedLinkStatus returns true if the link was interrupted.\n\n```go\nfunc IsInterruptedResourceStatus(status core.ResourceStatus) bool\n```\nIsInterruptedResourceStatus returns true if the resource was interrupted.\n\n```go\nfunc IsRollingBackOrFailedStatus(status core.InstanceStatus) bool\n```\nIsRollingBackOrFailedStatus returns true if the instance status indicates a rollback is in progress or has completed/failed. This is used to mark pending items as skipped in real-time.\n\n```go\nfunc IsSuccessInstanceStatus(status core.InstanceStatus) bool\n```\nIsSuccessInstanceStatus returns true if the child blueprint completed successfully.\n\n```go\nfunc IsSuccessLinkStatus(status core.LinkStatus) bool\n```\nIsSuccessLinkStatus returns true if the link completed successfully.\n\n```go\nfunc IsSuccessResourceStatus(status core.ResourceStatus) bool\n```\nIsSuccessResourceStatus returns true if the resource completed successfully.\n\n```go\nfunc LinkStatusToAction(status core.LinkStatus) string\n```\nLinkStatusToAction converts a link status to a human-readable action string.\n\n```go\nfunc ProcessChildUpdate(state *EventProcessorState, data *container.ChildDeployUpdateMessage)\n```\nProcessChildUpdate handles a child blueprint update event.\n\n```go\nfunc ProcessInstanceUpdate(state *EventProcessorState, data *container.DeploymentUpdateMessage)\n```\nProcessInstanceUpdate handles an instance status update event.\n\n```go\nfunc ProcessLinkUpdate(state *EventProcessorState, data *container.LinkDeployUpdateMessage)\n```\nProcessLinkUpdate handles a link update event.\n\n```go\nfunc ProcessResourceUpdate(state *EventProcessorState, data *container.ResourceDeployUpdateMessage)\n```\nProcessResourceUpdate handles a resource update event.\n\n```go\nfunc ResourceStatusToAction(status core.ResourceStatus) string\n```\nResourceStatusToAction converts a resource status to a human-readable action string.\n\n```go\nfunc ToSplitPaneItems(items []DeployItem) []splitpane.Item\n```\nToSplitPaneItems converts a slice of DeployItems to splitpane.Items.\n\n```go\nfunc TrackChildInstanceMapping(state *EventProcessorState, data *container.ChildDeployUpdateMessage)\n```\nTrackChildInstanceMapping records the mapping from a child instance ID to its name and parent.\n\n```go\nfunc UpdateChildItemFromEvent(item *ChildDeployItem, data *container.ChildDeployUpdateMessage)\n```\nUpdateChildItemFromEvent updates a child item with data from an event.\n\n```go\nfunc UpdateLinkItemFromEvent(item *LinkDeployItem, data *container.LinkDeployUpdateMessage)\n```\nUpdateLinkItemFromEvent updates a link item with data from an event.\n\n```go\nfunc UpdateResourceItemFromEvent(item *ResourceDeployItem, data *container.ResourceDeployUpdateMessage)\n```\nUpdateResourceItemFromEvent updates a resource item with data from an event.\n\n## Types\n\n```go\ntype ActionType = shared.ActionType\n```\nType aliases for backwards compatibility with shared types.\n\n```go\ntype ChangeSummary struct {\n\tCreate   int\n\tUpdate   int\n\tDelete   int\n\tRecreate int\n}\n```\nChangeSummary holds counts of different change types.\n\n```go\ntype ChangesetFetchedMsg struct {\n\tChanges *changes.BlueprintChanges\n\n\t// Err is set when the change set the deployment was pointed at could not be\n\t// loaded. Staging is the only thing that produces a change set, so a\n\t// deployment pointed at one it cannot read has nothing to fall back on and\n\t// must not continue.\n\tErr error\n}\n```\nChangesetFetchedMsg is sent when changeset changes have been fetched for a deployment that was given an existing change set rather than staging one.\n\n```go\ntype ChildDeployItem struct {\n\tName             string\n\tParentInstanceID string\n\tChildInstanceID  string\n\tAction           ActionType\n\tStatus           core.InstanceStatus\n\tFailureReasons   []string\n\tGroup            int\n\tDurations        *state.InstanceCompletionDuration\n\tTimestamp        int64\n\tDepth            int\n\tSkipped          bool // Set to true when deployment failed before this child was attempted\n\t// Changes holds the blueprint changes for this child (from staging)\n\t// Used to provide hierarchy for GetChildren()\n\tChanges *changes.BlueprintChanges\n}\n```\nChildDeployItem represents a child blueprint being deployed.\n\n```go\nfunc CreateChildItem(state *EventProcessorState, data *container.ChildDeployUpdateMessage, childPath string) *ChildDeployItem\n```\nCreateChildItem creates a new child deploy item.\n\n```go\nfunc LookupOrMigrateChild(state *EventProcessorState, path, name string) *ChildDeployItem\n```\nLookupOrMigrateChild looks up a child by path, migrating from name-based key if needed.\n\n```go\nfunc (c *ChildDeployItem) GetAction() shared.ActionType\n```\n\n```go\nfunc (c *ChildDeployItem) GetChildStatus() core.InstanceStatus\n```\n\n```go\nfunc (c *ChildDeployItem) SetSkipped(skipped bool)\n```\n\n```go\ntype ConfirmDeployMsg struct {\n\tConfirmed bool\n}\n```\nConfirmDeployMsg is a message to confirm deployment after staging review.\n\n```go\ntype DeployAppConfig struct {\n\t// Context is bound to the engine calls the deploy model makes so they are\n\t// cancelled when the command context is cancelled (e.g. on Ctrl+C).\n\tContext                context.Context\n\tDeployEngine           engine.DeployEngine\n\tLogger                 *zap.Logger\n\tChangesetID            string\n\tInstanceID             string\n\tInstanceName           string\n\tBlueprintFile          string\n\tIsDefaultBlueprintFile bool\n\tAutoRollback           bool\n\tForce                  bool\n\tStageFirst             bool\n\tAutoApprove            bool\n\tAutoApproveCodeOnly    bool\n\tSkipPrompts            bool\n\tStyles                 *stylespkg.Styles\n\tHeadless               bool\n\tHeadlessWriter         io.Writer\n\tJSONMode               bool\n\tPreflight              tea.Model\n\t// OperationConfig carries provider/transformer/context-variable values\n\t// (including the deploy target) sent to the engine during staging and\n\t// deployment.\n\tOperationConfig *types.BlueprintOperationConfig\n}\n```\nDeployAppConfig holds the configuration for creating a new deploy application.\n\n```go\ntype DeployConfigFormInitialValues struct {\n\tInstanceName string\n\tInstanceID   string\n\tChangesetID  string\n\tStageFirst   bool\n\tAutoApprove  bool\n\tAutoRollback bool\n}\n```\nDeployConfigFormInitialValues holds the initial values for the deploy config form.\n\n```go\ntype DeployConfigFormModel struct {\n\t// contains filtered or unexported fields\n}\n```\nDeployConfigFormModel provides a combined form for deploy configuration.\n\n```go\nfunc NewDeployConfigFormModel(\n\tinitialValues DeployConfigFormInitialValues,\n\tstyles *stylespkg.Styles,\n) *DeployConfigFormModel\n```\nNewDeployConfigFormModel creates a new deploy config form model.\n\n```go\nfunc (m DeployConfigFormModel) Init() tea.Cmd\n```\nInit initializes the model.\n\n```go\nfunc (m DeployConfigFormModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\nUpdate handles messages.\n\n```go\nfunc (m DeployConfigFormModel) View() string\n```\nView renders the model.\n\n```go\ntype DeployConfigMsg struct {\n\tInstanceName string\n\tInstanceID   string\n\tChangesetID  string\n\tStageFirst   bool\n\tAutoApprove  bool\n\tAutoRollback bool\n}\n```\nDeployConfigMsg is sent when the user completes the deploy configuration form.\n\n```go\ntype DeployDetailsRenderer struct {\n\tMaxExpandDepth          int\n\tNavigationStackDepth    int\n\tPreDeployInstanceState  *state.InstanceState // Instance state fetched before deployment for unchanged items\n\tPostDeployInstanceState *state.InstanceState // Instance state fetched after deployment completes\n\tFinished                bool                 // True when deployment has finished (enables spec view shortcut)\n}\n```\nDeployDetailsRenderer implements splitpane.DetailsRenderer for deploy UI.\n\n```go\nfunc (r *DeployDetailsRenderer) RenderDetails(item splitpane.Item, width int, s *styles.Styles) string\n```\nRenderDetails renders the right pane content for a selected item.\n\n```go\ntype DeployErrorMsg struct {\n\tErr error\n}\n```\nDeployErrorMsg is a message containing an error from the deployment process.\n\n```go\ntype DeployEventMsg types.BlueprintInstanceEvent\n```\nDeployEventMsg is a message containing a deployment event.\n\n```go\ntype DeployFooterRenderer struct {\n\tInstanceID          string\n\tInstanceName        string\n\tChangesetID         string\n\tCurrentStatus       core.InstanceStatus\n\tFinalStatus         core.InstanceStatus\n\tFailureReasons      []string             // Legacy: kept for backwards compatibility\n\tElementFailures     []ElementFailure     // Structured failures with root cause details\n\tInterruptedElements []InterruptedElement // Elements that were interrupted\n\tSuccessfulElements  []SuccessfulElement  // Elements that completed successfully\n\tFinished            bool\n\tSpinnerView         string // Current spinner frame for animated \"Deploying\" state\n\tHasInstanceState    bool   // Whether instance state is available (enables exports view)\n\tHasPreRollbackState bool   // Whether pre-rollback state is available (enables pre-rollback view)\n}\n```\nDeployFooterRenderer implements splitpane.FooterRenderer for deploy UI.\n\n```go\nfunc (r *DeployFooterRenderer) RenderFooter(model *splitpane.Model, s *styles.Styles) string\n```\nRenderFooter renders the deploy-specific footer.\n\n```go\ntype DeployItem struct {\n\tType        ItemType\n\tResource    *ResourceDeployItem\n\tChild       *ChildDeployItem\n\tLink        *LinkDeployItem\n\tParentChild string // For nested items\n\tDepth       int\n\t// Path is the full path to this item (e.g., \"childA/childB/resourceName\")\n\t// Used for unique keying in the shared lookup maps.\n\tPath string\n\t// Changes holds the blueprint changes for this item (for children)\n\t// Used to provide hierarchy for GetChildren()\n\tChanges *changes.BlueprintChanges\n\t// InstanceState holds the instance state for this level of the hierarchy.\n\t// Used to provide resource state data for items with no changes and\n\t// to populate the navigation tree with all instance elements.\n\tInstanceState *state.InstanceState\n\t// contains filtered or unexported fields\n}\n```\nDeployItem is the unified item type for the split-pane.\n\n```go\nfunc BuildItemsFromChangeset(\n\tchangesetChanges *changes.BlueprintChanges,\n\tresourcesByName map[string]*ResourceDeployItem,\n\tchildrenByName map[string]*ChildDeployItem,\n\tlinksByName map[string]*LinkDeployItem,\n\tinstanceState *state.InstanceState,\n) []DeployItem\n```\nBuildItemsFromChangeset creates the initial item list from changeset data. This provides the proper hierarchy (resources, children, links) from the start. It also includes items with no changes from the instance state.\n\n```go\nfunc MakeChildDeployItem(\n\tchild *ChildDeployItem,\n\tchildChanges *changes.BlueprintChanges,\n\tinstanceState *state.InstanceState,\n\tchildrenByName map[string]*ChildDeployItem,\n\tresourcesByName map[string]*ResourceDeployItem,\n\tlinksByName map[string]*LinkDeployItem,\n) DeployItem\n```\nMakeChildDeployItem creates a DeployItem for a child blueprint with lookup maps. This allows child blueprints to properly navigate and display their nested items.\n\n```go\nfunc (i *DeployItem) BuildChildPath(childName string) string\n```\nBuildChildPath builds a path for a child element based on this item's path.\n\n```go\nfunc (i *DeployItem) CanDrillDown() bool\n```\nCanDrillDown returns true if the item can be drilled into. A child can be drilled into if it has either Changes (from changeset) or InstanceState (for unchanged items).\n\n```go\nfunc (i *DeployItem) ChildrenByName() map[string]*ChildDeployItem\n```\nChildrenByName returns the internal children lookup map.\n\n```go\nfunc (i *DeployItem) GetAction() string\n```\nGetAction returns the action badge text.\n\n```go\nfunc (i *DeployItem) GetChildren() []splitpane.Item\n```\nGetChildren returns child items when expanded. Uses the Changes data from the changeset to build the hierarchy, and also includes unchanged items from InstanceState.\n\n```go\nfunc (i *DeployItem) GetDefaultChildAction() ActionType\n```\nGetDefaultChildAction returns the action to use for child items created from state. If the parent has ActionInspect, children inherit that; otherwise ActionNoChange.\n\n```go\nfunc (i *DeployItem) GetDepth() int\n```\nGetDepth returns the nesting depth for indentation.\n\n```go\nfunc (i *DeployItem) GetID() string\n```\nGetID returns a unique identifier for the item.\n\n```go\nfunc (i *DeployItem) GetIcon(selected bool) string\n```\nGetIcon returns a status icon for the item.\n\n```go\nfunc (i *DeployItem) GetIconStyled(s *styles.Styles, styled bool) string\n```\nGetIconStyled returns a styled icon for the item.\n\n```go\nfunc (i *DeployItem) GetItemType() string\n```\nGetItemType returns the type for section grouping.\n\n```go\nfunc (i *DeployItem) GetLinkResourceNames() (string, string)\n```\nGetLinkResourceNames returns the resource names for a link item.\n\n```go\nfunc (i *DeployItem) GetName() string\n```\nGetName returns the display name for the item. Links read as \"a → b\" rather than as their logical \"a::b\" name, which stays the identifier.\n\n```go\nfunc (i *DeployItem) GetParentID() string\n```\nGetParentID returns the parent item ID.\n\n```go\nfunc (i *DeployItem) GetResourceGroup() *shared.ResourceGroup\n```\nGetResourceGroup returns the abstract resource group for this item, if any.\n\n```go\nfunc (i *DeployItem) IsDirectChild(path, pathPrefix string) bool\n```\nIsDirectChild checks if the given path represents a direct child of the pathPrefix. A direct child has exactly one path component after the prefix. Example: pathPrefix=\"parent/\", path=\"parent/child\" -\u003e true Example: pathPrefix=\"parent/\", path=\"parent/child/grandchild\" -\u003e false\n\n```go\nfunc (i *DeployItem) IsExpandable() bool\n```\nIsExpandable returns true if the item can be expanded in-place. A child can be expanded if it has either Changes (from changeset) or InstanceState (for unchanged items).\n\n```go\nfunc (i *DeployItem) LinksByName() map[string]*LinkDeployItem\n```\nLinksByName returns the internal links lookup map.\n\n```go\nfunc (i *DeployItem) ResourcesByName() map[string]*ResourceDeployItem\n```\nResourcesByName returns the internal resources lookup map.\n\n```go\ntype DeployModel struct {\n\t// contains filtered or unexported fields\n}\n```\nDeployModel is the model for the deploy view with real-time split-pane.\n\n```go\nfunc NewDeployModel(cfg DeployModelConfig) DeployModel\n```\nNewDeployModel creates a new deploy model.\n\n```go\nfunc (m *DeployModel) Err() error\n```\nErr returns the error stored in the model.\n\n```go\nfunc (m *DeployModel) FinalStatus() core.InstanceStatus\n```\nFinalStatus returns the final instance status after deployment.\n\n```go\nfunc (m DeployModel) Init() tea.Cmd\n```\nInit initializes the deploy model.\n\n```go\nfunc (m *DeployModel) Items() []DeployItem\n```\nItems returns the deployment items.\n\n```go\nfunc (m *DeployModel) ResourcesByName() map[string]*ResourceDeployItem\n```\nResourcesByName returns the resources lookup map.\n\n```go\nfunc (m *DeployModel) SetChangesetChanges(changesetChanges *changes.BlueprintChanges)\n```\nSetChangesetChanges sets the changeset changes and rebuilds items from them. This is called when staging completes with the full changeset data.\n\n```go\nfunc (m *DeployModel) SetPreDeployInstanceState(instanceState *state.InstanceState)\n```\nSetPreDeployInstanceState sets the pre-deployment instance state. This is called when staging completes with the instance state for displaying unchanged items.\n\n```go\nfunc (m DeployModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\nUpdate handles messages for the deploy model.\n\n```go\nfunc (m DeployModel) View() string\n```\nView renders the deploy model.\n\n```go\ntype DeployModelConfig struct {\n\tContext          context.Context\n\tDeployEngine     engine.DeployEngine\n\tLogger           *zap.Logger\n\tChangesetID      string\n\tInstanceID       string\n\tInstanceName     string\n\tBlueprintFile    string\n\tBlueprintSource  string\n\tAutoRollback     bool\n\tForce            bool\n\tStyles           *stylespkg.Styles\n\tIsHeadless       bool\n\tHeadlessWriter   io.Writer\n\tChangesetChanges *changes.BlueprintChanges\n\tJSONMode         bool\n\t// OperationConfig carries provider/transformer/context-variable values\n\t// (including the deploy target) sent to the engine in the deploy payload.\n\tOperationConfig *types.BlueprintOperationConfig\n}\n```\nDeployModelConfig holds the configuration for creating a new DeployModel.\n\n```go\ntype DeploySectionGrouper struct {\n\tshared.SectionGrouper\n}\n```\nDeploySectionGrouper implements splitpane.SectionGrouper for deploy UI.\n\n```go\ntype DeployStagingFooterRenderer struct {\n\tChangesetID      string\n\tSummary          ChangeSummary\n\tHasExportChanges bool\n\tCodeOnlyDenied   bool\n\tCodeOnlyReasons  []string\n}\n```\nDeployStagingFooterRenderer implements splitpane.FooterRenderer for the staging view when used in the deploy command flow. It shows a confirmation prompt instead of the standalone staging footer.\n\n```go\nfunc (r *DeployStagingFooterRenderer) RenderFooter(model *splitpane.Model, s *styles.Styles) string\n```\nRenderFooter renders the footer with staging summary and confirmation prompt. The footer height matches the original StageFooterRenderer for consistent split pane layout.\n\n```go\ntype DeployStartedMsg struct {\n\tInstanceID string\n}\n```\nDeployStartedMsg is a message indicating that deployment has started.\n\n```go\ntype DeployStateRefreshTickMsg struct{}\n```\nDeployStateRefreshTickMsg triggers a periodic state refresh during deployment.\n\n```go\ntype DeployStateRefreshedMsg struct {\n\tInstanceState *state.InstanceState\n}\n```\nDeployStateRefreshedMsg is sent when the instance state has been refreshed during deployment.\n\n```go\ntype DeployStreamClosedMsg struct{}\n```\nDeployStreamClosedMsg is sent when the deploy event stream is closed. This typically happens due to a stream timeout or the connection being dropped.\n\n```go\ntype DestroyChangesetErrorMsg struct{}\n```\nDestroyChangesetErrorMsg is sent when deployment fails because the changeset was created for a destroy operation.\n\n```go\ntype DriftDetailsRenderer = driftui.DriftDetailsRenderer\n```\nType aliases for backwards compatibility\n\n```go\ntype DriftFooterRenderer = driftui.DriftFooterRenderer\n```\nType aliases for backwards compatibility\n\n```go\ntype DriftItem = driftui.DriftItem\n```\nType aliases for backwards compatibility\n\n```go\ntype DriftItemType = driftui.DriftItemType\n```\nType aliases for backwards compatibility\n\n```go\ntype DriftSectionGrouper = driftui.DriftSectionGrouper\n```\nType aliases for backwards compatibility\n\n```go\ntype ElementFailure = shared.ElementFailure\n```\nRe-export shared result types for backwards compatibility.\n\n```go\ntype EventProcessorState struct {\n\tInstanceID              string\n\tResourcesByName         map[string]*ResourceDeployItem\n\tChildrenByName          map[string]*ChildDeployItem\n\tLinksByName             map[string]*LinkDeployItem\n\tInstanceIDToChildName   map[string]string\n\tInstanceIDToParentID    map[string]string\n\tChildNameToInstancePath map[string]string\n\tChangesetChanges        *changes.BlueprintChanges\n\tFooterRenderer          *DeployFooterRenderer\n\tItems                   []DeployItem\n}\n```\nEventProcessorState contains the state needed for event processing operations. This allows the event processing helper functions to be tested independently.\n\n```go\nfunc NewEventProcessorState(instanceID string) *EventProcessorState\n```\nNewEventProcessorState creates a new EventProcessorState with initialized maps.\n\n```go\ntype ExportsDetailsRenderer struct{}\n```\nExportsDetailsRenderer renders export details for a selected instance.\n\n```go\nfunc (r *ExportsDetailsRenderer) RenderDetails(item splitpane.Item, width int, s *styles.Styles) string\n```\nRenderDetails renders the export details for the selected instance.\n\n```go\ntype ExportsFooterRenderer struct{}\n```\nExportsFooterRenderer renders the footer for the exports view.\n\n```go\nfunc (r *ExportsFooterRenderer) RenderFooter(model *splitpane.Model, s *styles.Styles) string\n```\nRenderFooter renders the exports view footer with navigation hints.\n\n```go\ntype ExportsHeaderRenderer struct {\n\tInstanceName string\n}\n```\nExportsHeaderRenderer renders the header for the exports view.\n\n```go\nfunc (r *ExportsHeaderRenderer) RenderHeader(model *splitpane.Model, s *styles.Styles) string\n```\nRenderHeader renders the exports view header.\n\n```go\ntype ExportsInstanceItem struct {\n\t// Name is the display name for the instance\n\tName string\n\t// Path is the full path for lookup (e.g., \"childA/childB\")\n\tPath string\n\t// InstanceID is the blueprint instance ID\n\tInstanceID string\n\t// ExportCount is the number of exports for this instance\n\tExportCount int\n\t// Depth is the nesting level for indentation\n\tDepth int\n\t// InstanceState holds the full instance state for export access\n\tInstanceState *state.InstanceState\n}\n```\nExportsInstanceItem represents a blueprint instance in the exports view. It can be the root instance or any nested child blueprint instance.\n\n```go\nfunc (i *ExportsInstanceItem) CanDrillDown() bool\n```\nCanDrillDown indicates whether the item can be drilled into.\n\n```go\nfunc (i *ExportsInstanceItem) GetAction() string\n```\nGetAction returns action badge text.\n\n```go\nfunc (i *ExportsInstanceItem) GetChildren() []splitpane.Item\n```\nGetChildren returns child items (none for exports view).\n\n```go\nfunc (i *ExportsInstanceItem) GetDepth() int\n```\nGetDepth returns the nesting depth for indentation.\n\n```go\nfunc (i *ExportsInstanceItem) GetID() string\n```\nGetID returns a unique identifier for the item.\n\n```go\nfunc (i *ExportsInstanceItem) GetIcon(selected bool) string\n```\nGetIcon returns a status icon for the item.\n\n```go\nfunc (i *ExportsInstanceItem) GetItemType() string\n```\nGetItemType returns the type for section grouping.\n\n```go\nfunc (i *ExportsInstanceItem) GetName() string\n```\nGetName returns the display name for the item.\n\n```go\nfunc (i *ExportsInstanceItem) GetParentID() string\n```\nGetParentID returns the parent item ID.\n\n```go\nfunc (i *ExportsInstanceItem) IsExpandable() bool\n```\nIsExpandable indicates whether the item can be expanded in-place.\n\n```go\ntype ExportsModel struct {\n\t// contains filtered or unexported fields\n}\n```\nExportsModel is a Bubble Tea model for viewing blueprint instance exports. It uses a split pane with instance hierarchy on the left and export details on the right.\n\n```go\nfunc NewExportsModel(\n\tinstanceState *state.InstanceState,\n\tinstanceName string,\n\twidth, height int,\n\ts *styles.Styles,\n) ExportsModel\n```\nNewExportsModel creates a new exports view model.\n\n```go\nfunc (m ExportsModel) HasExports() bool\n```\nHasExports returns true if any instance in the hierarchy has exports.\n\n```go\nfunc (m ExportsModel) Init() tea.Cmd\n```\nInit implements tea.Model.\n\n```go\nfunc (m ExportsModel) IsFiltering() bool\n```\nIsFiltering reports whether the exports pane is capturing keys for a search term, so that hosts do not treat those keys as their own shortcuts.\n\n```go\nfunc (m ExportsModel) Update(msg tea.Msg) (ExportsModel, tea.Cmd)\n```\nUpdate implements tea.Model.\n\n```go\nfunc (m *ExportsModel) UpdateInstanceState(instanceState *state.InstanceState)\n```\nUpdateInstanceState updates the exports view with new instance state. This allows the exports view to dynamically update during deployment.\n\n```go\nfunc (m ExportsModel) View() string\n```\nView implements tea.Model.\n\n```go\ntype InstanceResolvedMsg struct {\n\tInstanceID   string\n\tInstanceName string\n\t// Err is set when the instance could not be looked up for a reason other than it not\n\t// existing, in which case staging must not go ahead as if it were a new instance.\n\tErr error\n}\n```\nInstanceResolvedMsg is a message indicating instance identifiers have been resolved. This is used to handle the case where a user provides an instance name for a new deployment and we need to resolve it to an empty instance ID (since the instance doesn't exist yet).\n\n```go\ntype InterruptedElement = shared.InterruptedElement\n```\nRe-export shared result types for backwards compatibility.\n\n```go\ntype ItemType = shared.ItemType\n```\nType aliases for backwards compatibility with shared types.\n\n```go\ntype LinkDeployItem struct {\n\tLinkID               string\n\tLinkName             string\n\tResourceAName        string\n\tResourceBName        string\n\tAction               ActionType\n\tStatus               core.LinkStatus\n\tPreciseStatus        core.PreciseLinkStatus\n\tFailureReasons       []string\n\tCurrentStageAttempt  int\n\tCanRetryCurrentStage bool\n\tDurations            *state.LinkCompletionDurations\n\tTimestamp            int64\n\tSkipped              bool // Set to true when deployment failed before this link was attempted\n}\n```\nLinkDeployItem represents a link being deployed.\n\n```go\nfunc LookupOrMigrateLink(state *EventProcessorState, path, name string) *LinkDeployItem\n```\nLookupOrMigrateLink looks up a link by path, migrating from name-based key if needed.\n\n```go\nfunc (l *LinkDeployItem) GetAction() shared.ActionType\n```\n\n```go\nfunc (l *LinkDeployItem) GetLinkStatus() core.LinkStatus\n```\n\n```go\nfunc (l *LinkDeployItem) SetSkipped(skipped bool)\n```\n\n```go\ntype MainModel struct {\n\tError error\n\t// contains filtered or unexported fields\n}\n```\nMainModel is the top-level model for the deploy command TUI. It manages the session state and delegates to sub-models.\n\n```go\nfunc NewDeployApp(cfg DeployAppConfig) (*MainModel, error)\n```\nNewDeployApp creates a new deploy application with the given configuration.\n\n```go\nfunc (m *MainModel) ChangesetID() string\n```\nChangesetID returns the changeset ID.\n\n```go\nfunc (m MainModel) GetEngine() shared.InstanceLookup\n```\nGetEngine returns the engine for the InstanceResolver interface.\n\n```go\nfunc (m MainModel) GetInstanceID() string\n```\nGetInstanceID returns the instance ID for the InstanceResolver interface.\n\n```go\nfunc (m MainModel) GetInstanceName() string\n```\nGetInstanceName returns the instance name for the InstanceResolver interface.\n\n```go\nfunc (m MainModel) Init() tea.Cmd\n```\nInit initializes the main model.\n\n```go\nfunc (m *MainModel) InstanceName() string\n```\nInstanceName returns the instance name.\n\n```go\nfunc (m *MainModel) StageFirst() bool\n```\nStageFirst returns whether staging should happen before deployment.\n\n```go\nfunc (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\nUpdate handles messages for the main model.\n\n```go\nfunc (m MainModel) View() string\n```\nView renders the main model.\n\n```go\ntype PostDeployInstanceStateFetchedMsg struct {\n\tInstanceState *state.InstanceState\n}\n```\nPostDeployInstanceStateFetchedMsg is sent when instance state has been fetched after deployment.\n\n```go\ntype PreDeployInstanceStateFetchedMsg struct {\n\tInstanceState *state.InstanceState\n}\n```\nPreDeployInstanceStateFetchedMsg is sent when instance state has been fetched before deployment. This is used for direct deployments (without staging) to populate unchanged items.\n\n```go\ntype ResourceDeployItem struct {\n\tName           string\n\tResourceID     string\n\tResourceType   string\n\tDisplayName    string\n\tAction         ActionType\n\tStatus         core.ResourceStatus\n\tPreciseStatus  core.PreciseResourceStatus\n\tFailureReasons []string\n\tAttempt        int\n\tCanRetry       bool\n\tGroup          int\n\tDurations      *state.ResourceCompletionDurations\n\tTimestamp      int64\n\tSkipped        bool // Set to true when deployment failed before this resource was attempted\n\t// Changes holds the provider.Changes data from the changeset, providing access to\n\t// AppliedResourceInfo.CurrentResourceState for pre-deployment outputs and spec data.\n\tChanges *provider.Changes\n\t// ResourceState holds the pre-deployment resource state from the instance.\n\t// Used for displaying outputs and spec data for items with no changes or before deployment completes.\n\tResourceState *state.ResourceState\n\t// contains filtered or unexported fields\n}\n```\nResourceDeployItem represents a resource being deployed with real-time status.\n\n```go\nfunc LookupOrMigrateResource(state *EventProcessorState, path, name string) *ResourceDeployItem\n```\nLookupOrMigrateResource looks up a resource by path, migrating from name-based key if needed.\n\n```go\nfunc (r *ResourceDeployItem) AbstractGroup() *shared.ResourceGroup\n```\nAbstractGroup returns the abstract resource this resource was expanded from, resolved from the change set and any pre-deployment state. Returns nil for resources that were not produced by a transformer.\n\nThe result is remembered once known. A resource being created has no state to read the annotations from until it has been deployed, so without this the resource would sit outside its group and jump into it partway through the deployment, and back out again on any refresh that arrived without state.\n\n```go\nfunc (r *ResourceDeployItem) GetAction() shared.ActionType\n```\n\n```go\nfunc (r *ResourceDeployItem) GetResourceStatus() core.ResourceStatus\n```\n\n```go\nfunc (r *ResourceDeployItem) SetSkipped(skipped bool)\n```\n\n```go\ntype ResultCollector struct {\n\tResourcesByName map[string]*ResourceDeployItem\n\tChildrenByName  map[string]*ChildDeployItem\n\tLinksByName     map[string]*LinkDeployItem\n\tSuccessful      []SuccessfulElement\n\tFailures        []ElementFailure\n\tInterrupted     []InterruptedElement\n\t// contains filtered or unexported fields\n}\n```\nResultCollector encapsulates the state needed for collecting deployment results. This pattern reduces parameter counts by grouping related data together. Exported for testing purposes.\n\n```go\nfunc (c *ResultCollector) AssignLinkGroups()\n```\nAssignLinkGroups assigns each collected link the abstract resource group shared by both of its endpoints. Links that cross groups, or whose endpoints are not grouped, are left ungrouped so they stay at the top level of the overview rather than being filed under one side of the link.\n\n```go\nfunc (c *ResultCollector) CollectChildResult(item *ChildDeployItem, path string)\n```\n\n```go\nfunc (c *ResultCollector) CollectFromChanges(blueprintChanges *changes.BlueprintChanges, parentPath, pathPrefix string)\n```\ncollectFromChanges recursively collects results from nested blueprint changes. The pathPrefix is used for map key lookups (e.g., \"parentChild/childName\"), while parentPath is used for display (e.g., \"children.parentChild::children.childName\").\n\n```go\nfunc (c *ResultCollector) CollectFromItems(items []DeployItem, parentPath string)\n```\ncollectFromItems recursively collects successful operations, failures, and interruptions from items, building full paths as it traverses the hierarchy.\n\n```go\nfunc (c *ResultCollector) CollectLinkResult(item *LinkDeployItem, path string)\n```\n\n```go\nfunc (c *ResultCollector) CollectResourceResult(item *ResourceDeployItem, path string)\n```\n\n```go\ntype StagingFooterOption func(*DeployStagingFooterRenderer)\n```\nStagingFooterOption configures optional fields on DeployStagingFooterRenderer.\n\n```go\nfunc WithCodeOnlyDenial(reasons []string) StagingFooterOption\n```\nWithCodeOnlyDenial marks the footer as showing a code-only approval denial with the given reasons.\n\n```go\ntype StartDeployMsg struct{}\n```\nStartDeployMsg is a message to initiate deployment.\n\n```go\ntype SuccessfulElement = shared.SuccessfulElement\n```\nRe-export shared result types for backwards compatibility.\n\n","path":"github.com/newstack-cloud/deploy-cli-sdk/tui/deployui","name":"deployui","synopsis":"Package deployui provides drift item types for the deploy command.","isRedistributable":true}
