{"modulePath":"github.com/newstack-cloud/deploy-cli-sdk","version":"v0.10.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package validateui\n\n## Types\n\n```go\ntype MainModel struct {\n\tError error\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewValidateApp(cfg ValidateAppConfig) (*MainModel, error)\n```\n\n```go\nfunc (m MainModel) Init() tea.Cmd\n```\n\n```go\nfunc (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\n\n```go\nfunc (m MainModel) View() string\n```\n\n```go\ntype ValidateAppConfig struct {\n\t// Context is bound to the engine calls the validate model makes so they are\n\t// cancelled when the command context is cancelled (e.g. on Ctrl+C).\n\tContext                context.Context\n\tEngine                 engine.DeployEngine\n\tLogger                 *zap.Logger\n\tBlueprintFile          string\n\tIsDefaultBlueprintFile bool\n\tStyles                 *stylespkg.Styles\n\tHeadless               bool\n\tHeadlessWriter         io.Writer\n\tPreflight              tea.Model\n\t// TransformSpec, when non-nil, sets the validation loader's transform-spec\n\t// option directly and skips the interactive options form. When nil, the\n\t// SDK default of true is used and (in interactive mode) the form is shown.\n\tTransformSpec *bool\n\t// ValidateAfterTransform, when non-nil, sets the validation loader's\n\t// validate-after-transform option directly and skips the interactive\n\t// options form. When nil, the SDK default of false is used and (in\n\t// interactive mode) the form is shown.\n\tValidateAfterTransform *bool\n\t// OperationConfig carries provider/transformer/context-variable values\n\t// (including the deploy target) sent to the engine in the validation\n\t// payload, so transformer plugins run correctly during validation.\n\tOperationConfig *types.BlueprintOperationConfig\n}\n```\nValidateAppConfig holds configuration for creating a new validate application.\n\n```go\ntype ValidateErrMsg struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype ValidateModel struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewValidateModel(cfg ValidateModelConfig) ValidateModel\n```\n\n```go\nfunc (m ValidateModel) Init() tea.Cmd\n```\n\n```go\nfunc (m *ValidateModel) SetTransformSpec(transformSpec bool)\n```\nSetTransformSpec sets the transform spec option.\n\n```go\nfunc (m *ValidateModel) SetValidateAfterTransform(validateAfterTransform bool)\n```\nSetValidateAfterTransform sets the validate after transform option.\n\n```go\nfunc (m ValidateModel) TransformSpec() bool\n```\nTransformSpec returns whether the transform spec option is enabled.\n\n```go\nfunc (m ValidateModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\n\n```go\nfunc (m ValidateModel) ValidateAfterTransform() bool\n```\nValidateAfterTransform returns whether the validate-after-transform option is enabled.\n\n```go\nfunc (m ValidateModel) View() string\n```\n\n```go\ntype ValidateModelConfig struct {\n\tContext                context.Context\n\tEngine                 engine.DeployEngine\n\tLogger                 *zap.Logger\n\tHeadless               bool\n\tHeadlessWriter         io.Writer\n\tStyles                 *stylespkg.Styles\n\tTransformSpec          bool\n\tValidateAfterTransform bool\n\t// OperationConfig carries provider/transformer/context-variable values\n\t// (including the deploy target) sent to the engine in the validation payload.\n\tOperationConfig *types.BlueprintOperationConfig\n}\n```\nValidateModelConfig holds the configuration for creating a new ValidateModel.\n\n```go\ntype ValidateOptionsFormConfig struct {\n\t// InitialTransformSpec is the pre-populated transform spec value\n\t// (from flag/env/config).\n\tInitialTransformSpec bool\n\t// InitialValidateAfterTransform is the pre-populated value for\n\t// validating after transform (from flag/env/config).\n\tInitialValidateAfterTransform bool\n}\n```\nValidateOptionsFormConfig holds the initial values for the validate options form.\n\n```go\ntype ValidateOptionsFormModel struct {\n\t// contains filtered or unexported fields\n}\n```\nValidateOptionsFormModel provides a form for configuring validation loader options.\n\n```go\nfunc NewValidateOptionsFormModel(\n\tstyles *stylespkg.Styles,\n\tconfig ValidateOptionsFormConfig,\n) *ValidateOptionsFormModel\n```\nNewValidateOptionsFormModel creates a new validate options form model.\n\n```go\nfunc (m *ValidateOptionsFormModel) Init() tea.Cmd\n```\n\n```go\nfunc (m *ValidateOptionsFormModel) Update(msg tea.Msg) (*ValidateOptionsFormModel, tea.Cmd)\n```\n\n```go\nfunc (m *ValidateOptionsFormModel) View() string\n```\n\n```go\ntype ValidateOptionsSelectedMsg struct {\n\tTransformSpec          bool\n\tValidateAfterTransform bool\n}\n```\nValidateOptionsSelectedMsg is sent when the user completes the validate options form.\n\n```go\ntype ValidateResultMsg *types.BlueprintValidationEvent\n```\n\n```go\ntype ValidateStage int\n```\nValidateStage is an enum that represents the different stages of the validation process.\n\n```go\nconst (\n\t// ValidateStageConfigStructure is the stage where application configuration\n\t// and project structure is validated.\n\tValidateStageConfigStructure ValidateStage = iota\n\t// ValidateStageBlueprint is the stage where the blueprint is validated.\n\tValidateStageBlueprint\n\t// ValidateStageSourceCode is the stage where the source code of the\n\t// application is validated.\n\tValidateStageSourceCode\n)\n```\n\n```go\ntype ValidateStreamMsg struct{}\n```\n\n","path":"github.com/newstack-cloud/deploy-cli-sdk/tui/validateui","name":"validateui","synopsis":"","isRedistributable":true}
