mocks

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockApplier

type MockApplier struct {
	mock.Mock
}

MockApplier is an autogenerated mock type for the Applier type

func NewMockApplier

func NewMockApplier(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockApplier

NewMockApplier creates a new instance of MockApplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockApplier) Applied

func (_mock *MockApplier) Applied(ctx context.Context) ([]string, error)

Applied provides a mock function for the type MockApplier

func (*MockApplier) Apply

func (_mock *MockApplier) Apply(ctx context.Context, project modgen.Project, replace bool, confirm bool) (modgen.ApplyResult, error)

Apply provides a mock function for the type MockApplier

func (*MockApplier) EXPECT

func (_m *MockApplier) EXPECT() *MockApplier_Expecter

func (*MockApplier) Unapply

func (_mock *MockApplier) Unapply(ctx context.Context, name string, confirm bool) (modgen.UnapplyResult, error)

Unapply provides a mock function for the type MockApplier

type MockApplier_Applied_Call

type MockApplier_Applied_Call struct {
	*mock.Call
}

MockApplier_Applied_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Applied'

func (*MockApplier_Applied_Call) Return

func (_c *MockApplier_Applied_Call) Return(strings []string, err error) *MockApplier_Applied_Call

func (*MockApplier_Applied_Call) Run

func (*MockApplier_Applied_Call) RunAndReturn

func (_c *MockApplier_Applied_Call) RunAndReturn(run func(ctx context.Context) ([]string, error)) *MockApplier_Applied_Call

type MockApplier_Apply_Call

type MockApplier_Apply_Call struct {
	*mock.Call
}

MockApplier_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'

func (*MockApplier_Apply_Call) Return

func (_c *MockApplier_Apply_Call) Return(applyResult modgen.ApplyResult, err error) *MockApplier_Apply_Call

func (*MockApplier_Apply_Call) Run

func (_c *MockApplier_Apply_Call) Run(run func(ctx context.Context, project modgen.Project, replace bool, confirm bool)) *MockApplier_Apply_Call

func (*MockApplier_Apply_Call) RunAndReturn

func (_c *MockApplier_Apply_Call) RunAndReturn(run func(ctx context.Context, project modgen.Project, replace bool, confirm bool) (modgen.ApplyResult, error)) *MockApplier_Apply_Call

type MockApplier_Expecter

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

func (*MockApplier_Expecter) Applied

Applied is a helper method to define mock.On call

  • ctx context.Context

func (*MockApplier_Expecter) Apply

func (_e *MockApplier_Expecter) Apply(ctx any, project any, replace any, confirm any) *MockApplier_Apply_Call

Apply is a helper method to define mock.On call

  • ctx context.Context
  • project modgen.Project
  • replace bool
  • confirm bool

func (*MockApplier_Expecter) Unapply

func (_e *MockApplier_Expecter) Unapply(ctx any, name any, confirm any) *MockApplier_Unapply_Call

Unapply is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • confirm bool

type MockApplier_Unapply_Call

type MockApplier_Unapply_Call struct {
	*mock.Call
}

MockApplier_Unapply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unapply'

func (*MockApplier_Unapply_Call) Return

func (_c *MockApplier_Unapply_Call) Return(unapplyResult modgen.UnapplyResult, err error) *MockApplier_Unapply_Call

func (*MockApplier_Unapply_Call) Run

func (_c *MockApplier_Unapply_Call) Run(run func(ctx context.Context, name string, confirm bool)) *MockApplier_Unapply_Call

func (*MockApplier_Unapply_Call) RunAndReturn

func (_c *MockApplier_Unapply_Call) RunAndReturn(run func(ctx context.Context, name string, confirm bool) (modgen.UnapplyResult, error)) *MockApplier_Unapply_Call

type MockModuleGenerationService

type MockModuleGenerationService struct {
	mock.Mock
}

MockModuleGenerationService is an autogenerated mock type for the ModuleGenerationService type

func NewMockModuleGenerationService

func NewMockModuleGenerationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockModuleGenerationService

NewMockModuleGenerationService creates a new instance of MockModuleGenerationService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockModuleGenerationService) EXPECT

func (*MockModuleGenerationService) GenerateProject

func (_mock *MockModuleGenerationService) GenerateProject(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources) (modgen.Project, error)

GenerateProject provides a mock function for the type MockModuleGenerationService

func (*MockModuleGenerationService) RepairProject

func (_mock *MockModuleGenerationService) RepairProject(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources, project modgen.Project, problems []string) (modgen.Project, error)

RepairProject provides a mock function for the type MockModuleGenerationService

type MockModuleGenerationService_Expecter

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

func (*MockModuleGenerationService_Expecter) GenerateProject

GenerateProject is a helper method to define mock.On call

  • ctx context.Context
  • brief modgen.Brief
  • sources modgen.ModuleSources

func (*MockModuleGenerationService_Expecter) RepairProject

func (_e *MockModuleGenerationService_Expecter) RepairProject(ctx any, brief any, sources any, project any, problems any) *MockModuleGenerationService_RepairProject_Call

RepairProject is a helper method to define mock.On call

  • ctx context.Context
  • brief modgen.Brief
  • sources modgen.ModuleSources
  • project modgen.Project
  • problems []string

type MockModuleGenerationService_GenerateProject_Call

type MockModuleGenerationService_GenerateProject_Call struct {
	*mock.Call
}

MockModuleGenerationService_GenerateProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GenerateProject'

func (*MockModuleGenerationService_GenerateProject_Call) Return

func (*MockModuleGenerationService_GenerateProject_Call) Run

func (_c *MockModuleGenerationService_GenerateProject_Call) Run(run func(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources)) *MockModuleGenerationService_GenerateProject_Call

func (*MockModuleGenerationService_GenerateProject_Call) RunAndReturn

func (_c *MockModuleGenerationService_GenerateProject_Call) RunAndReturn(run func(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources) (modgen.Project, error)) *MockModuleGenerationService_GenerateProject_Call

type MockModuleGenerationService_RepairProject_Call

type MockModuleGenerationService_RepairProject_Call struct {
	*mock.Call
}

MockModuleGenerationService_RepairProject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RepairProject'

func (*MockModuleGenerationService_RepairProject_Call) Return

func (*MockModuleGenerationService_RepairProject_Call) Run

func (_c *MockModuleGenerationService_RepairProject_Call) Run(run func(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources, project modgen.Project, problems []string)) *MockModuleGenerationService_RepairProject_Call

func (*MockModuleGenerationService_RepairProject_Call) RunAndReturn

func (_c *MockModuleGenerationService_RepairProject_Call) RunAndReturn(run func(ctx context.Context, brief modgen.Brief, sources modgen.ModuleSources, project modgen.Project, problems []string) (modgen.Project, error)) *MockModuleGenerationService_RepairProject_Call

type MockProjectStore

type MockProjectStore struct {
	mock.Mock
}

MockProjectStore is an autogenerated mock type for the ProjectStore type

func NewMockProjectStore

func NewMockProjectStore(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProjectStore

NewMockProjectStore creates a new instance of MockProjectStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockProjectStore) Delete

func (_mock *MockProjectStore) Delete(ctx context.Context, name string) error

Delete provides a mock function for the type MockProjectStore

func (*MockProjectStore) EXPECT

func (*MockProjectStore) Get

func (_mock *MockProjectStore) Get(ctx context.Context, name string) (modgen.Project, error)

Get provides a mock function for the type MockProjectStore

func (*MockProjectStore) Install

func (_mock *MockProjectStore) Install(ctx context.Context, project modgen.Project) error

Install provides a mock function for the type MockProjectStore

func (*MockProjectStore) List

func (_mock *MockProjectStore) List(ctx context.Context) ([]modgen.InstalledProject, error)

List provides a mock function for the type MockProjectStore

func (*MockProjectStore) Zip

func (_mock *MockProjectStore) Zip(ctx context.Context, name string) ([]byte, error)

Zip provides a mock function for the type MockProjectStore

type MockProjectStore_Delete_Call

type MockProjectStore_Delete_Call struct {
	*mock.Call
}

MockProjectStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockProjectStore_Delete_Call) Return

func (*MockProjectStore_Delete_Call) Run

func (*MockProjectStore_Delete_Call) RunAndReturn

type MockProjectStore_Expecter

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

func (*MockProjectStore_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockProjectStore_Expecter) Get

Get is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockProjectStore_Expecter) Install

Install is a helper method to define mock.On call

  • ctx context.Context
  • project modgen.Project

func (*MockProjectStore_Expecter) List

List is a helper method to define mock.On call

  • ctx context.Context

func (*MockProjectStore_Expecter) Zip

Zip is a helper method to define mock.On call

  • ctx context.Context
  • name string

type MockProjectStore_Get_Call

type MockProjectStore_Get_Call struct {
	*mock.Call
}

MockProjectStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'

func (*MockProjectStore_Get_Call) Return

func (_c *MockProjectStore_Get_Call) Return(project modgen.Project, err error) *MockProjectStore_Get_Call

func (*MockProjectStore_Get_Call) Run

func (*MockProjectStore_Get_Call) RunAndReturn

func (_c *MockProjectStore_Get_Call) RunAndReturn(run func(ctx context.Context, name string) (modgen.Project, error)) *MockProjectStore_Get_Call

type MockProjectStore_Install_Call

type MockProjectStore_Install_Call struct {
	*mock.Call
}

MockProjectStore_Install_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Install'

func (*MockProjectStore_Install_Call) Return

func (*MockProjectStore_Install_Call) Run

func (_c *MockProjectStore_Install_Call) Run(run func(ctx context.Context, project modgen.Project)) *MockProjectStore_Install_Call

func (*MockProjectStore_Install_Call) RunAndReturn

func (_c *MockProjectStore_Install_Call) RunAndReturn(run func(ctx context.Context, project modgen.Project) error) *MockProjectStore_Install_Call

type MockProjectStore_List_Call

type MockProjectStore_List_Call struct {
	*mock.Call
}

MockProjectStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'

func (*MockProjectStore_List_Call) Return

func (_c *MockProjectStore_List_Call) Return(installedProjects []modgen.InstalledProject, err error) *MockProjectStore_List_Call

func (*MockProjectStore_List_Call) Run

func (*MockProjectStore_List_Call) RunAndReturn

func (_c *MockProjectStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]modgen.InstalledProject, error)) *MockProjectStore_List_Call

type MockProjectStore_Zip_Call

type MockProjectStore_Zip_Call struct {
	*mock.Call
}

MockProjectStore_Zip_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Zip'

func (*MockProjectStore_Zip_Call) Return

func (*MockProjectStore_Zip_Call) Run

func (*MockProjectStore_Zip_Call) RunAndReturn

func (_c *MockProjectStore_Zip_Call) RunAndReturn(run func(ctx context.Context, name string) ([]byte, error)) *MockProjectStore_Zip_Call

type MockProjectValidator

type MockProjectValidator struct {
	mock.Mock
}

MockProjectValidator is an autogenerated mock type for the ProjectValidator type

func NewMockProjectValidator

func NewMockProjectValidator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockProjectValidator

NewMockProjectValidator creates a new instance of MockProjectValidator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockProjectValidator) EXPECT

func (*MockProjectValidator) Validate

func (_mock *MockProjectValidator) Validate(ctx context.Context, project modgen.Project) modgen.ValidationReport

Validate provides a mock function for the type MockProjectValidator

type MockProjectValidator_Expecter

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

func (*MockProjectValidator_Expecter) Validate

Validate is a helper method to define mock.On call

  • ctx context.Context
  • project modgen.Project

type MockProjectValidator_Validate_Call

type MockProjectValidator_Validate_Call struct {
	*mock.Call
}

MockProjectValidator_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'

func (*MockProjectValidator_Validate_Call) Return

func (_c *MockProjectValidator_Validate_Call) Return(validationReport modgen.ValidationReport) *MockProjectValidator_Validate_Call

func (*MockProjectValidator_Validate_Call) Run

func (_c *MockProjectValidator_Validate_Call) Run(run func(ctx context.Context, project modgen.Project)) *MockProjectValidator_Validate_Call

func (*MockProjectValidator_Validate_Call) RunAndReturn

func (_c *MockProjectValidator_Validate_Call) RunAndReturn(run func(ctx context.Context, project modgen.Project) modgen.ValidationReport) *MockProjectValidator_Validate_Call

Jump to

Keyboard shortcuts

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