mocks

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toolchain

type Toolchain struct {
	mock.Mock
}

Toolchain is an autogenerated mock type for the Toolchain type

func NewToolchain

func NewToolchain(t interface {
	mock.TestingT
	Cleanup(func())
}) *Toolchain

NewToolchain creates a new instance of Toolchain. 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 (*Toolchain) EXPECT

func (_m *Toolchain) EXPECT() *Toolchain_Expecter

func (*Toolchain) GetBuildInfo

func (_mock *Toolchain) GetBuildInfo(path string) (*buildinfo.BuildInfo, error)

GetBuildInfo provides a mock function for the type Toolchain

func (*Toolchain) GetLatestModuleVersion

func (_mock *Toolchain) GetLatestModuleVersion(ctx context.Context, module model.Module) (model.Module, error)

GetLatestModuleVersion provides a mock function for the type Toolchain

func (*Toolchain) GetModuleFile

func (_mock *Toolchain) GetModuleFile(ctx context.Context, module model.Module) (*modfile.File, error)

GetModuleFile provides a mock function for the type Toolchain

func (*Toolchain) GetModuleOrigin

func (_mock *Toolchain) GetModuleOrigin(ctx context.Context, module model.Module) (*model.ModuleOrigin, error)

GetModuleOrigin provides a mock function for the type Toolchain

func (*Toolchain) Install

func (_mock *Toolchain) Install(ctx context.Context, path string, pkg model.Package, rebuild bool) error

Install provides a mock function for the type Toolchain

func (*Toolchain) VulnCheck

func (_mock *Toolchain) VulnCheck(ctx context.Context, path string) ([]model.Vulnerability, error)

VulnCheck provides a mock function for the type Toolchain

type Toolchain_Expecter

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

func (*Toolchain_Expecter) GetBuildInfo

func (_e *Toolchain_Expecter) GetBuildInfo(path interface{}) *Toolchain_GetBuildInfo_Call

GetBuildInfo is a helper method to define mock.On call

  • path string

func (*Toolchain_Expecter) GetLatestModuleVersion

func (_e *Toolchain_Expecter) GetLatestModuleVersion(ctx interface{}, module interface{}) *Toolchain_GetLatestModuleVersion_Call

GetLatestModuleVersion is a helper method to define mock.On call

  • ctx context.Context
  • module model.Module

func (*Toolchain_Expecter) GetModuleFile

func (_e *Toolchain_Expecter) GetModuleFile(ctx interface{}, module interface{}) *Toolchain_GetModuleFile_Call

GetModuleFile is a helper method to define mock.On call

  • ctx context.Context
  • module model.Module

func (*Toolchain_Expecter) GetModuleOrigin

func (_e *Toolchain_Expecter) GetModuleOrigin(ctx interface{}, module interface{}) *Toolchain_GetModuleOrigin_Call

GetModuleOrigin is a helper method to define mock.On call

  • ctx context.Context
  • module model.Module

func (*Toolchain_Expecter) Install

func (_e *Toolchain_Expecter) Install(ctx interface{}, path interface{}, pkg interface{}, rebuild interface{}) *Toolchain_Install_Call

Install is a helper method to define mock.On call

  • ctx context.Context
  • path string
  • pkg model.Package
  • rebuild bool

func (*Toolchain_Expecter) VulnCheck

func (_e *Toolchain_Expecter) VulnCheck(ctx interface{}, path interface{}) *Toolchain_VulnCheck_Call

VulnCheck is a helper method to define mock.On call

  • ctx context.Context
  • path string

type Toolchain_GetBuildInfo_Call

type Toolchain_GetBuildInfo_Call struct {
	*mock.Call
}

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

func (*Toolchain_GetBuildInfo_Call) Return

func (*Toolchain_GetBuildInfo_Call) Run

func (*Toolchain_GetBuildInfo_Call) RunAndReturn

type Toolchain_GetLatestModuleVersion_Call

type Toolchain_GetLatestModuleVersion_Call struct {
	*mock.Call
}

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

func (*Toolchain_GetLatestModuleVersion_Call) Return

func (*Toolchain_GetLatestModuleVersion_Call) Run

func (*Toolchain_GetLatestModuleVersion_Call) RunAndReturn

type Toolchain_GetModuleFile_Call

type Toolchain_GetModuleFile_Call struct {
	*mock.Call
}

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

func (*Toolchain_GetModuleFile_Call) Return

func (*Toolchain_GetModuleFile_Call) Run

func (*Toolchain_GetModuleFile_Call) RunAndReturn

type Toolchain_GetModuleOrigin_Call

type Toolchain_GetModuleOrigin_Call struct {
	*mock.Call
}

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

func (*Toolchain_GetModuleOrigin_Call) Return

func (*Toolchain_GetModuleOrigin_Call) Run

func (*Toolchain_GetModuleOrigin_Call) RunAndReturn

type Toolchain_Install_Call

type Toolchain_Install_Call struct {
	*mock.Call
}

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

func (*Toolchain_Install_Call) Return

func (*Toolchain_Install_Call) Run

func (_c *Toolchain_Install_Call) Run(run func(ctx context.Context, path string, pkg model.Package, rebuild bool)) *Toolchain_Install_Call

func (*Toolchain_Install_Call) RunAndReturn

func (_c *Toolchain_Install_Call) RunAndReturn(run func(ctx context.Context, path string, pkg model.Package, rebuild bool) error) *Toolchain_Install_Call

type Toolchain_VulnCheck_Call

type Toolchain_VulnCheck_Call struct {
	*mock.Call
}

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

func (*Toolchain_VulnCheck_Call) Return

func (_c *Toolchain_VulnCheck_Call) Return(vulnerabilitys []model.Vulnerability, err error) *Toolchain_VulnCheck_Call

func (*Toolchain_VulnCheck_Call) Run

func (*Toolchain_VulnCheck_Call) RunAndReturn