scaffold

package
v1.223.1-rc.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Overview

Package scaffold is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockScaffoldUI

type MockScaffoldUI struct {
	// contains filtered or unexported fields
}

MockScaffoldUI is a mock of ScaffoldUI interface.

func NewMockScaffoldUI

func NewMockScaffoldUI(ctrl *gomock.Controller) *MockScaffoldUI

NewMockScaffoldUI creates a new mock instance.

func (*MockScaffoldUI) ConfirmUpdateInstead

func (m *MockScaffoldUI) ConfirmUpdateInstead(targetPath string) (bool, error)

ConfirmUpdateInstead mocks base method.

func (*MockScaffoldUI) DisplayTemplateTable

func (m *MockScaffoldUI) DisplayTemplateTable(header []string, rows [][]string)

DisplayTemplateTable mocks base method.

func (*MockScaffoldUI) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockScaffoldUI) ExecuteWithBaseRef

func (m *MockScaffoldUI) ExecuteWithBaseRef(embedsConfig *templates.Configuration, targetPath string, force, update, useDefaults bool, baseRef string, cmdTemplateValues map[string]any) error

ExecuteWithBaseRef mocks base method.

func (*MockScaffoldUI) ExecuteWithInteractiveFlowAndBaseRefResult

func (m *MockScaffoldUI) ExecuteWithInteractiveFlowAndBaseRefResult(embedsConfig *templates.Configuration, targetPath string, force, update, useDefaults bool, baseRef string, cmdTemplateValues map[string]any) (string, error)

ExecuteWithInteractiveFlowAndBaseRefResult mocks base method.

func (*MockScaffoldUI) PromptForTemplate

func (m *MockScaffoldUI) PromptForTemplate(templateType string, arg1 any) (string, error)

PromptForTemplate mocks base method.

func (*MockScaffoldUI) SetConflictStrategy

func (m *MockScaffoldUI) SetConflictStrategy(strategy merge.ConflictStrategy)

SetConflictStrategy mocks base method.

func (*MockScaffoldUI) SetDryRun

func (m *MockScaffoldUI) SetDryRun(dryRun bool)

SetDryRun mocks base method.

func (*MockScaffoldUI) SetSkipHooks

func (m *MockScaffoldUI) SetSkipHooks(skip func(string) bool)

SetSkipHooks mocks base method.

type MockScaffoldUIMockRecorder

type MockScaffoldUIMockRecorder struct {
	// contains filtered or unexported fields
}

MockScaffoldUIMockRecorder is the mock recorder for MockScaffoldUI.

func (*MockScaffoldUIMockRecorder) ConfirmUpdateInstead

func (mr *MockScaffoldUIMockRecorder) ConfirmUpdateInstead(targetPath any) *gomock.Call

ConfirmUpdateInstead indicates an expected call of ConfirmUpdateInstead.

func (*MockScaffoldUIMockRecorder) DisplayTemplateTable

func (mr *MockScaffoldUIMockRecorder) DisplayTemplateTable(header, rows any) *gomock.Call

DisplayTemplateTable indicates an expected call of DisplayTemplateTable.

func (*MockScaffoldUIMockRecorder) ExecuteWithBaseRef

func (mr *MockScaffoldUIMockRecorder) ExecuteWithBaseRef(embedsConfig, targetPath, force, update, useDefaults, baseRef, cmdTemplateValues any) *gomock.Call

ExecuteWithBaseRef indicates an expected call of ExecuteWithBaseRef.

func (*MockScaffoldUIMockRecorder) ExecuteWithInteractiveFlowAndBaseRefResult

func (mr *MockScaffoldUIMockRecorder) ExecuteWithInteractiveFlowAndBaseRefResult(embedsConfig, targetPath, force, update, useDefaults, baseRef, cmdTemplateValues any) *gomock.Call

ExecuteWithInteractiveFlowAndBaseRefResult indicates an expected call of ExecuteWithInteractiveFlowAndBaseRefResult.

func (*MockScaffoldUIMockRecorder) PromptForTemplate

func (mr *MockScaffoldUIMockRecorder) PromptForTemplate(templateType, arg1 any) *gomock.Call

PromptForTemplate indicates an expected call of PromptForTemplate.

func (*MockScaffoldUIMockRecorder) SetConflictStrategy

func (mr *MockScaffoldUIMockRecorder) SetConflictStrategy(strategy any) *gomock.Call

SetConflictStrategy indicates an expected call of SetConflictStrategy.

func (*MockScaffoldUIMockRecorder) SetDryRun

func (mr *MockScaffoldUIMockRecorder) SetDryRun(dryRun any) *gomock.Call

SetDryRun indicates an expected call of SetDryRun.

func (*MockScaffoldUIMockRecorder) SetSkipHooks

func (mr *MockScaffoldUIMockRecorder) SetSkipHooks(skip any) *gomock.Call

SetSkipHooks indicates an expected call of SetSkipHooks.

type ScaffoldCommandProvider

type ScaffoldCommandProvider struct{}

ScaffoldCommandProvider implements the CommandProvider interface.

func (*ScaffoldCommandProvider) GetAliases

func (s *ScaffoldCommandProvider) GetAliases() []internal.CommandAlias

GetAliases returns command aliases (none for scaffold).

func (*ScaffoldCommandProvider) GetCommand

func (s *ScaffoldCommandProvider) GetCommand() *cobra.Command

GetCommand returns the scaffold command.

func (*ScaffoldCommandProvider) GetCompatibilityFlags

func (s *ScaffoldCommandProvider) GetCompatibilityFlags() map[string]compat.CompatibilityFlag

GetCompatibilityFlags returns nil as this command doesn't need compatibility flags.

func (*ScaffoldCommandProvider) GetFlagsBuilder

func (s *ScaffoldCommandProvider) GetFlagsBuilder() flags.Builder

GetFlagsBuilder returns nil since the parent scaffold command has no flags. Flags (--force, --dry-run, --set) belong to the generate subcommand.

func (*ScaffoldCommandProvider) GetGroup

func (s *ScaffoldCommandProvider) GetGroup() string

GetGroup returns the command group for help organization.

func (*ScaffoldCommandProvider) GetName

func (s *ScaffoldCommandProvider) GetName() string

GetName returns the command name.

func (*ScaffoldCommandProvider) GetPositionalArgsBuilder

func (s *ScaffoldCommandProvider) GetPositionalArgsBuilder() *flags.PositionalArgsBuilder

GetPositionalArgsBuilder returns nil as this command doesn't use positional args builder.

func (*ScaffoldCommandProvider) IsExperimental

func (s *ScaffoldCommandProvider) IsExperimental() bool

IsExperimental returns whether this command is experimental. Scaffold ships as experimental while the template schema and update workflow mature; behavior may change between releases.

type ScaffoldUI

type ScaffoldUI interface {
	SetConflictStrategy(strategy merge.ConflictStrategy)
	SetDryRun(dryRun bool)
	SetSkipHooks(skip func(string) bool)
	PromptForTemplate(templateType string, templates interface{}) (string, error)
	DisplayTemplateTable(header []string, rows [][]string)
	ExecuteWithBaseRef(embedsConfig *templates.Configuration, targetPath string, force, update, useDefaults bool, baseRef string, cmdTemplateValues map[string]interface{}) error
	ExecuteWithInteractiveFlowAndBaseRefResult(embedsConfig *templates.Configuration, targetPath string, force, update, useDefaults bool, baseRef string, cmdTemplateValues map[string]interface{}) (string, error)
	ConfirmUpdateInstead(targetPath string) (bool, error)
}

ScaffoldUI is the subset of *generatorUI.InitUI's behavior the scaffold command depends on, extracted so tests can substitute a mock instead of driving the real interactive TUI (prompts, huh forms) end to end.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL