{"modulePath":"github.com/newstack-cloud/deploy-cli-sdk","version":"v0.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package jsonout\n\n## Functions\n\n```go\nfunc RedactChanges(source *changes.BlueprintChanges) *changes.BlueprintChanges\n```\nRedactChanges returns a copy of a change set with every value the provider declared sensitive replaced by a placeholder.\n\n```go\nfunc WriteJSON(w io.Writer, v any) error\n```\nWriteJSON writes a value as pretty-printed JSON to the writer.\n\n## Types\n\n```go\ntype ActionLink struct {\n\tTitle string `json:\"title,omitempty\"`\n\tURL   string `json:\"url\"`\n}\n```\nActionLink represents a link to documentation or resources.\n\n```go\ntype ChangeSummary struct {\n\tResources ResourceSummary `json:\"resources\"`\n\tChildren  ChildSummary    `json:\"children\"`\n\tLinks     LinkSummary     `json:\"links\"`\n\tExports   ExportSummary   `json:\"exports\"`\n}\n```\nChangeSummary contains summary counts organized by element type.\n\n```go\ntype ChildSummary struct {\n\tTotal  int `json:\"total\"`\n\tCreate int `json:\"create\"`\n\tUpdate int `json:\"update\"`\n\tDelete int `json:\"delete\"`\n}\n```\nChildSummary contains action counts for child blueprints.\n\n```go\ntype DeployDriftOutput struct {\n\tSuccess        bool                                 `json:\"success\"`\n\tDriftDetected  bool                                 `json:\"driftDetected\"`\n\tInstanceID     string                               `json:\"instanceId\"`\n\tInstanceName   string                               `json:\"instanceName,omitempty\"`\n\tChangesetID    string                               `json:\"changesetId,omitempty\"`\n\tMessage        string                               `json:\"message\"`\n\tReconciliation *container.ReconciliationCheckResult `json:\"reconciliation\"`\n}\n```\nDeployDriftOutput represents drift detected during deployment.\n\n```go\ntype DeployOutput struct {\n\tSuccess          bool                               `json:\"success\"`\n\tInstanceID       string                             `json:\"instanceId\"`\n\tInstanceName     string                             `json:\"instanceName,omitempty\"`\n\tChangesetID      string                             `json:\"changesetId\"`\n\tStatus           string                             `json:\"status\"`\n\tInstanceState    *state.InstanceState               `json:\"instanceState,omitempty\"`\n\tPreRollbackState *container.PreRollbackStateMessage `json:\"preRollbackState,omitempty\"`\n\tSummary          DeploySummary                      `json:\"summary\"`\n}\n```\nDeployOutput represents a successful deployment result.\n\n```go\ntype DeploySummary struct {\n\tSuccessful           int                             `json:\"successful\"`\n\tFailed               int                             `json:\"failed\"`\n\tInterrupted          int                             `json:\"interrupted\"`\n\tSkippedRollbackItems []container.SkippedRollbackItem `json:\"skippedRollbackItems,omitempty\"`\n\tElements             []DeployedElement               `json:\"elements\"`\n}\n```\nDeploySummary contains deployment result summary.\n\n```go\ntype DeployedElement struct {\n\tName           string   `json:\"name\"`\n\tPath           string   `json:\"path\"`\n\tType           string   `json:\"type\"` // \"resource\", \"child\", \"link\"\n\tStatus         string   `json:\"status\"`\n\tAction         string   `json:\"action,omitempty\"` // \"created\", \"updated\", \"destroyed\", etc.\n\tFailureReasons []string `json:\"failureReasons,omitempty\"`\n}\n```\nDeployedElement represents an element in the deployment.\n\n```go\ntype DestroyDriftOutput struct {\n\tSuccess        bool                                 `json:\"success\"`\n\tDriftDetected  bool                                 `json:\"driftDetected\"`\n\tInstanceID     string                               `json:\"instanceId\"`\n\tInstanceName   string                               `json:\"instanceName,omitempty\"`\n\tMessage        string                               `json:\"message\"`\n\tReconciliation *container.ReconciliationCheckResult `json:\"reconciliation\"`\n}\n```\nDestroyDriftOutput represents drift detected during destroy.\n\n```go\ntype DestroyOutput struct {\n\tSuccess         bool                 `json:\"success\"`\n\tInstanceID      string               `json:\"instanceId\"`\n\tInstanceName    string               `json:\"instanceName,omitempty\"`\n\tChangesetID     string               `json:\"changesetId\"`\n\tStatus          string               `json:\"status\"`\n\tInstanceState   *state.InstanceState `json:\"instanceState,omitempty\"`\n\tPreDestroyState *state.InstanceState `json:\"preDestroyState,omitempty\"`\n\tSummary         DestroySummary       `json:\"summary\"`\n}\n```\nDestroyOutput represents a successful destroy result.\n\n```go\ntype DestroySummary struct {\n\tDestroyed     int                `json:\"destroyed\"`\n\tFailed        int                `json:\"failed\"`\n\tInterrupted   int                `json:\"interrupted\"`\n\tRetainedCount int                `json:\"retainedCount\"`\n\tElements      []DestroyedElement `json:\"elements\"`\n}\n```\nDestroySummary contains destroy operation summary.\n\n```go\ntype DestroyedElement struct {\n\tName           string   `json:\"name\"`\n\tPath           string   `json:\"path\"`\n\tType           string   `json:\"type\"`   // \"resource\", \"child\", \"link\"\n\tStatus         string   `json:\"status\"` // \"destroyed\", \"failed\", \"interrupted\", or \"retained\"\n\tFailureReasons []string `json:\"failureReasons,omitempty\"`\n}\n```\nDestroyedElement represents an element in the destroy result.\n\n```go\ntype Diagnostic struct {\n\tLevel            string            `json:\"level\"`\n\tMessage          string            `json:\"message\"`\n\tLine             int               `json:\"line,omitempty\"`\n\tColumn           int               `json:\"column,omitempty\"`\n\tCode             string            `json:\"code,omitempty\"`\n\tCategory         string            `json:\"category,omitempty\"`\n\tSuggestedActions []SuggestedAction `json:\"suggestedActions,omitempty\"`\n}\n```\nDiagnostic represents a single diagnostic message.\n\n```go\ntype ErrorDetail struct {\n\tType        string            `json:\"type\"` // \"validation\", \"stream\", \"client\", \"internal\"\n\tMessage     string            `json:\"message\"`\n\tHint        string            `json:\"hint,omitempty\"`\n\tCause       string            `json:\"cause,omitempty\"`\n\tStatusCode  int               `json:\"statusCode,omitempty\"`\n\tDiagnostics []Diagnostic      `json:\"diagnostics,omitempty\"`\n\tValidation  []ValidationError `json:\"validation,omitempty\"`\n}\n```\nErrorDetail provides detailed error information.\n\n```go\ntype ErrorOutput struct {\n\tSuccess bool        `json:\"success\"`\n\tError   ErrorDetail `json:\"error\"`\n}\n```\nErrorOutput represents a structured error output.\n\n```go\nfunc NewErrorOutput(err error) ErrorOutput\n```\nNewErrorOutput converts an error to an ErrorOutput struct.\n\n```go\ntype ExportSummary struct {\n\tTotal     int `json:\"total\"`\n\tNew       int `json:\"new\"`\n\tModified  int `json:\"modified\"`\n\tRemoved   int `json:\"removed\"`\n\tUnchanged int `json:\"unchanged\"`\n}\n```\nExportSummary contains action counts for exports.\n\n```go\ntype LinkSummary struct {\n\tTotal  int `json:\"total\"`\n\tCreate int `json:\"create\"`\n\tUpdate int `json:\"update\"`\n\tDelete int `json:\"delete\"`\n}\n```\nLinkSummary contains action counts for links.\n\n```go\ntype ListInstanceItem struct {\n\tInstanceID            string `json:\"instanceId\"`\n\tInstanceName          string `json:\"instanceName\"`\n\tStatus                string `json:\"status\"`\n\tLastDeployedTimestamp int64  `json:\"lastDeployedTimestamp\"`\n}\n```\nListInstanceItem represents a single instance in the list output.\n\n```go\ntype ListInstancesOutput struct {\n\tSuccess    bool               `json:\"success\"`\n\tInstances  []ListInstanceItem `json:\"instances\"`\n\tTotalCount int                `json:\"totalCount\"`\n\tSearch     string             `json:\"search,omitempty\"`\n}\n```\nListInstancesOutput represents the result of listing instances.\n\n```go\ntype ResourceSummary struct {\n\tTotal    int `json:\"total\"`\n\tCreate   int `json:\"create\"`\n\tUpdate   int `json:\"update\"`\n\tDelete   int `json:\"delete\"`\n\tRecreate int `json:\"recreate\"`\n}\n```\nResourceSummary contains action counts for resources.\n\n```go\ntype StageDriftOutput struct {\n\tSuccess        bool                                 `json:\"success\"`\n\tDriftDetected  bool                                 `json:\"driftDetected\"`\n\tInstanceID     string                               `json:\"instanceId\"`\n\tInstanceName   string                               `json:\"instanceName,omitempty\"`\n\tMessage        string                               `json:\"message\"`\n\tReconciliation *container.ReconciliationCheckResult `json:\"reconciliation\"`\n}\n```\nStageDriftOutput represents drift detected during staging.\n\n```go\ntype StageOutput struct {\n\tSuccess      bool                      `json:\"success\"`\n\tChangesetID  string                    `json:\"changesetId\"`\n\tInstanceID   string                    `json:\"instanceId,omitempty\"`\n\tInstanceName string                    `json:\"instanceName,omitempty\"`\n\tChanges      *changes.BlueprintChanges `json:\"changes\"`\n\tSummary      ChangeSummary             `json:\"summary\"`\n}\n```\nStageOutput represents a successful staging result.\n\n```go\ntype StateImportOutput struct {\n\tSuccess        bool   `json:\"success\"`\n\tMode           string `json:\"mode\"`\n\tInstancesCount int    `json:\"instancesCount,omitempty\"`\n\tFilesExtracted int    `json:\"filesExtracted,omitempty\"`\n\tMessage        string `json:\"message\"`\n\tEncrypted      bool   `json:\"encrypted,omitempty\"`\n\t// FileExportedAt is when an encrypted input file was exported, in RFC 3339 form.\n\tFileExportedAt string   `json:\"fileExportedAt,omitempty\"`\n\tWarnings       []string `json:\"warnings,omitempty\"`\n}\n```\nStateImportOutput represents a state import result.\n\n```go\ntype SuggestedAction struct {\n\tType        string       `json:\"type\"`\n\tTitle       string       `json:\"title\"`\n\tDescription string       `json:\"description,omitempty\"`\n\tCommands    []string     `json:\"commands,omitempty\"`\n\tLinks       []ActionLink `json:\"links,omitempty\"`\n}\n```\nSuggestedAction represents an actionable suggestion for resolving an error.\n\n```go\ntype ValidationError struct {\n\tLocation string `json:\"location\"`\n\tMessage  string `json:\"message\"`\n\tType     string `json:\"type,omitempty\"`\n}\n```\nValidationError represents a single validation error.\n\n","path":"github.com/newstack-cloud/deploy-cli-sdk/jsonout","name":"jsonout","synopsis":"","isRedistributable":true}
