mocks

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 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 MockModuleService

type MockModuleService struct {
	mock.Mock
}

MockModuleService is an autogenerated mock type for the ModuleService type

func NewMockModuleService

func NewMockModuleService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockModuleService

NewMockModuleService creates a new instance of MockModuleService. 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 (*MockModuleService) Apply

func (_mock *MockModuleService) Apply(ctx context.Context, name string, replace bool, confirm bool) (modgen.Project, modgen.ApplyResult, error)

Apply provides a mock function for the type MockModuleService

func (*MockModuleService) Delete

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

Delete provides a mock function for the type MockModuleService

func (*MockModuleService) EXPECT

func (*MockModuleService) Generate

func (_mock *MockModuleService) Generate(ctx context.Context, brief modgen.Brief) (modgen.Project, modgen.ValidationReport, error)

Generate provides a mock function for the type MockModuleService

func (*MockModuleService) Get

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

Get provides a mock function for the type MockModuleService

func (*MockModuleService) List

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

List provides a mock function for the type MockModuleService

func (*MockModuleService) Unapply

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

Unapply provides a mock function for the type MockModuleService

func (*MockModuleService) Zip

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

Zip provides a mock function for the type MockModuleService

type MockModuleService_Apply_Call

type MockModuleService_Apply_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Apply_Call) Return

func (_c *MockModuleService_Apply_Call) Return(project modgen.Project, applyResult modgen.ApplyResult, err error) *MockModuleService_Apply_Call

func (*MockModuleService_Apply_Call) Run

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

func (*MockModuleService_Apply_Call) RunAndReturn

func (_c *MockModuleService_Apply_Call) RunAndReturn(run func(ctx context.Context, name string, replace bool, confirm bool) (modgen.Project, modgen.ApplyResult, error)) *MockModuleService_Apply_Call

type MockModuleService_Delete_Call

type MockModuleService_Delete_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Delete_Call) Return

func (*MockModuleService_Delete_Call) Run

func (*MockModuleService_Delete_Call) RunAndReturn

type MockModuleService_Expecter

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

func (*MockModuleService_Expecter) Apply

func (_e *MockModuleService_Expecter) Apply(ctx any, name any, replace any, confirm any) *MockModuleService_Apply_Call

Apply is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • replace bool
  • confirm bool

func (*MockModuleService_Expecter) Delete

Delete is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockModuleService_Expecter) Generate

Generate is a helper method to define mock.On call

  • ctx context.Context
  • brief modgen.Brief

func (*MockModuleService_Expecter) Get

Get is a helper method to define mock.On call

  • ctx context.Context
  • name string

func (*MockModuleService_Expecter) List

List is a helper method to define mock.On call

  • ctx context.Context

func (*MockModuleService_Expecter) Unapply

func (_e *MockModuleService_Expecter) Unapply(ctx any, name any, confirm any) *MockModuleService_Unapply_Call

Unapply is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • confirm bool

func (*MockModuleService_Expecter) Zip

Zip is a helper method to define mock.On call

  • ctx context.Context
  • name string

type MockModuleService_Generate_Call

type MockModuleService_Generate_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Generate_Call) Return

func (_c *MockModuleService_Generate_Call) Return(project modgen.Project, validationReport modgen.ValidationReport, err error) *MockModuleService_Generate_Call

func (*MockModuleService_Generate_Call) Run

func (_c *MockModuleService_Generate_Call) Run(run func(ctx context.Context, brief modgen.Brief)) *MockModuleService_Generate_Call

func (*MockModuleService_Generate_Call) RunAndReturn

func (_c *MockModuleService_Generate_Call) RunAndReturn(run func(ctx context.Context, brief modgen.Brief) (modgen.Project, modgen.ValidationReport, error)) *MockModuleService_Generate_Call

type MockModuleService_Get_Call

type MockModuleService_Get_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Get_Call) Return

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

func (*MockModuleService_Get_Call) Run

func (*MockModuleService_Get_Call) RunAndReturn

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

type MockModuleService_List_Call

type MockModuleService_List_Call struct {
	*mock.Call
}

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

func (*MockModuleService_List_Call) Return

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

func (*MockModuleService_List_Call) Run

func (*MockModuleService_List_Call) RunAndReturn

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

type MockModuleService_Unapply_Call

type MockModuleService_Unapply_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Unapply_Call) Return

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

func (*MockModuleService_Unapply_Call) Run

func (*MockModuleService_Unapply_Call) RunAndReturn

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

type MockModuleService_Zip_Call

type MockModuleService_Zip_Call struct {
	*mock.Call
}

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

func (*MockModuleService_Zip_Call) Return

func (*MockModuleService_Zip_Call) Run

func (*MockModuleService_Zip_Call) RunAndReturn

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

Jump to

Keyboard shortcuts

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