mocks

package
v0.7.15 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

type Console struct {
	mock.Mock
}

Console is an autogenerated mock type for the Console type

func NewConsole

func NewConsole(t interface {
	mock.TestingT
	Cleanup(func())
}) *Console

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

func (_m *Console) EXPECT() *Console_Expecter

func (*Console) RunCmd

func (_m *Console) RunCmd(ctx context.Context, dir string, command string, commandParams ...string) (string, error)

RunCmd provides a mock function with given fields: ctx, dir, command, commandParams

type Console_Expecter

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

func (*Console_Expecter) RunCmd

func (_e *Console_Expecter) RunCmd(ctx interface{}, dir interface{}, command interface{}, commandParams ...interface{}) *Console_RunCmd_Call

RunCmd is a helper method to define mock.On call

  • ctx context.Context
  • dir string
  • command string
  • commandParams ...string

type Console_RunCmd_Call

type Console_RunCmd_Call struct {
	*mock.Call
}

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

func (*Console_RunCmd_Call) Return

func (_c *Console_RunCmd_Call) Return(_a0 string, _a1 error) *Console_RunCmd_Call

func (*Console_RunCmd_Call) Run

func (_c *Console_RunCmd_Call) Run(run func(ctx context.Context, dir string, command string, commandParams ...string)) *Console_RunCmd_Call

func (*Console_RunCmd_Call) RunAndReturn

func (_c *Console_RunCmd_Call) RunAndReturn(run func(context.Context, string, string, ...string) (string, error)) *Console_RunCmd_Call

type CurrentProjectGitWalker

type CurrentProjectGitWalker struct {
	mock.Mock
}

CurrentProjectGitWalker is an autogenerated mock type for the CurrentProjectGitWalker type

func NewCurrentProjectGitWalker

func NewCurrentProjectGitWalker(t interface {
	mock.TestingT
	Cleanup(func())
}) *CurrentProjectGitWalker

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

func (*CurrentProjectGitWalker) GetDirWalker

func (_m *CurrentProjectGitWalker) GetDirWalker(workingDir string, gitRef string, path string) (core.DirWalker, error)

GetDirWalker provides a mock function with given fields: workingDir, gitRef, path

type CurrentProjectGitWalker_Expecter

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

func (*CurrentProjectGitWalker_Expecter) GetDirWalker

func (_e *CurrentProjectGitWalker_Expecter) GetDirWalker(workingDir interface{}, gitRef interface{}, path interface{}) *CurrentProjectGitWalker_GetDirWalker_Call

GetDirWalker is a helper method to define mock.On call

  • workingDir string
  • gitRef string
  • path string

type CurrentProjectGitWalker_GetDirWalker_Call

type CurrentProjectGitWalker_GetDirWalker_Call struct {
	*mock.Call
}

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

func (*CurrentProjectGitWalker_GetDirWalker_Call) Return

func (*CurrentProjectGitWalker_GetDirWalker_Call) Run

func (*CurrentProjectGitWalker_GetDirWalker_Call) RunAndReturn

type LockFile

type LockFile struct {
	mock.Mock
}

LockFile is an autogenerated mock type for the LockFile type

func NewLockFile

func NewLockFile(t interface {
	mock.TestingT
	Cleanup(func())
}) *LockFile

NewLockFile creates a new instance of LockFile. 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 (*LockFile) DepsIter

func (_m *LockFile) DepsIter() iter.Seq[models.LockFileInfo]

DepsIter provides a mock function with given fields:

func (*LockFile) EXPECT

func (_m *LockFile) EXPECT() *LockFile_Expecter

func (*LockFile) IsEmpty

func (_m *LockFile) IsEmpty() bool

IsEmpty provides a mock function with given fields:

func (*LockFile) Read

func (_m *LockFile) Read(moduleName string) (models.LockFileInfo, error)

Read provides a mock function with given fields: moduleName

func (*LockFile) Write

func (_m *LockFile) Write(moduleName string, revisionVersion string, installedPackageHash models.ModuleHash) error

Write provides a mock function with given fields: moduleName, revisionVersion, installedPackageHash

type LockFile_DepsIter_Call

type LockFile_DepsIter_Call struct {
	*mock.Call
}

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

func (*LockFile_DepsIter_Call) Return

func (*LockFile_DepsIter_Call) Run

func (_c *LockFile_DepsIter_Call) Run(run func()) *LockFile_DepsIter_Call

func (*LockFile_DepsIter_Call) RunAndReturn

type LockFile_Expecter

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

func (*LockFile_Expecter) DepsIter

func (_e *LockFile_Expecter) DepsIter() *LockFile_DepsIter_Call

DepsIter is a helper method to define mock.On call

func (*LockFile_Expecter) IsEmpty

IsEmpty is a helper method to define mock.On call

func (*LockFile_Expecter) Read

func (_e *LockFile_Expecter) Read(moduleName interface{}) *LockFile_Read_Call

Read is a helper method to define mock.On call

  • moduleName string

func (*LockFile_Expecter) Write

func (_e *LockFile_Expecter) Write(moduleName interface{}, revisionVersion interface{}, installedPackageHash interface{}) *LockFile_Write_Call

Write is a helper method to define mock.On call

  • moduleName string
  • revisionVersion string
  • installedPackageHash models.ModuleHash

type LockFile_IsEmpty_Call

type LockFile_IsEmpty_Call struct {
	*mock.Call
}

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

func (*LockFile_IsEmpty_Call) Return

func (*LockFile_IsEmpty_Call) Run

func (_c *LockFile_IsEmpty_Call) Run(run func()) *LockFile_IsEmpty_Call

func (*LockFile_IsEmpty_Call) RunAndReturn

func (_c *LockFile_IsEmpty_Call) RunAndReturn(run func() bool) *LockFile_IsEmpty_Call

type LockFile_Read_Call

type LockFile_Read_Call struct {
	*mock.Call
}

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

func (*LockFile_Read_Call) Return

func (*LockFile_Read_Call) Run

func (_c *LockFile_Read_Call) Run(run func(moduleName string)) *LockFile_Read_Call

func (*LockFile_Read_Call) RunAndReturn

func (_c *LockFile_Read_Call) RunAndReturn(run func(string) (models.LockFileInfo, error)) *LockFile_Read_Call

type LockFile_Write_Call

type LockFile_Write_Call struct {
	*mock.Call
}

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

func (*LockFile_Write_Call) Return

func (*LockFile_Write_Call) Run

func (_c *LockFile_Write_Call) Run(run func(moduleName string, revisionVersion string, installedPackageHash models.ModuleHash)) *LockFile_Write_Call

func (*LockFile_Write_Call) RunAndReturn

type ModuleConfig

type ModuleConfig struct {
	mock.Mock
}

ModuleConfig is an autogenerated mock type for the ModuleConfig type

func NewModuleConfig

func NewModuleConfig(t interface {
	mock.TestingT
	Cleanup(func())
}) *ModuleConfig

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

func (_m *ModuleConfig) EXPECT() *ModuleConfig_Expecter

func (*ModuleConfig) ReadFromRepo

func (_m *ModuleConfig) ReadFromRepo(ctx context.Context, repo repository.Repo, revision models.Revision) (models.ModuleConfig, error)

ReadFromRepo provides a mock function with given fields: ctx, repo, revision

type ModuleConfig_Expecter

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

func (*ModuleConfig_Expecter) ReadFromRepo

func (_e *ModuleConfig_Expecter) ReadFromRepo(ctx interface{}, repo interface{}, revision interface{}) *ModuleConfig_ReadFromRepo_Call

ReadFromRepo is a helper method to define mock.On call

  • ctx context.Context
  • repo repository.Repo
  • revision models.Revision

type ModuleConfig_ReadFromRepo_Call

type ModuleConfig_ReadFromRepo_Call struct {
	*mock.Call
}

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

func (*ModuleConfig_ReadFromRepo_Call) Return

func (*ModuleConfig_ReadFromRepo_Call) Run

func (*ModuleConfig_ReadFromRepo_Call) RunAndReturn

type Rule

type Rule struct {
	mock.Mock
}

Rule is an autogenerated mock type for the Rule type

func NewRule

func NewRule(t interface {
	mock.TestingT
	Cleanup(func())
}) *Rule

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

func (_m *Rule) EXPECT() *Rule_Expecter

func (*Rule) Message

func (_m *Rule) Message() string

Message provides a mock function with given fields:

func (*Rule) Validate

func (_m *Rule) Validate(_a0 core.ProtoInfo) ([]core.Issue, error)

Validate provides a mock function with given fields: _a0

type Rule_Expecter

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

func (*Rule_Expecter) Message

func (_e *Rule_Expecter) Message() *Rule_Message_Call

Message is a helper method to define mock.On call

func (*Rule_Expecter) Validate

func (_e *Rule_Expecter) Validate(_a0 interface{}) *Rule_Validate_Call

Validate is a helper method to define mock.On call

  • _a0 core.ProtoInfo

type Rule_Message_Call

type Rule_Message_Call struct {
	*mock.Call
}

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

func (*Rule_Message_Call) Return

func (_c *Rule_Message_Call) Return(_a0 string) *Rule_Message_Call

func (*Rule_Message_Call) Run

func (_c *Rule_Message_Call) Run(run func()) *Rule_Message_Call

func (*Rule_Message_Call) RunAndReturn

func (_c *Rule_Message_Call) RunAndReturn(run func() string) *Rule_Message_Call

type Rule_Validate_Call

type Rule_Validate_Call struct {
	*mock.Call
}

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

func (*Rule_Validate_Call) Return

func (_c *Rule_Validate_Call) Return(_a0 []core.Issue, _a1 error) *Rule_Validate_Call

func (*Rule_Validate_Call) Run

func (_c *Rule_Validate_Call) Run(run func(_a0 core.ProtoInfo)) *Rule_Validate_Call

func (*Rule_Validate_Call) RunAndReturn

func (_c *Rule_Validate_Call) RunAndReturn(run func(core.ProtoInfo) ([]core.Issue, error)) *Rule_Validate_Call

type Storage

type Storage struct {
	mock.Mock
}

Storage is an autogenerated mock type for the Storage type

func NewStorage

func NewStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *Storage

NewStorage creates a new instance of Storage. 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 (*Storage) CreateCacheDownloadDir

func (_m *Storage) CreateCacheDownloadDir(_a0 models.CacheDownloadPaths) error

CreateCacheDownloadDir provides a mock function with given fields: _a0

func (*Storage) CreateCacheRepositoryDir

func (_m *Storage) CreateCacheRepositoryDir(name string) (string, error)

CreateCacheRepositoryDir provides a mock function with given fields: name

func (*Storage) EXPECT

func (_m *Storage) EXPECT() *Storage_Expecter

func (*Storage) GetCacheDownloadPaths

func (_m *Storage) GetCacheDownloadPaths(module models.Module, revision models.Revision) models.CacheDownloadPaths

GetCacheDownloadPaths provides a mock function with given fields: module, revision

func (*Storage) GetInstallDir

func (_m *Storage) GetInstallDir(moduleName string, revisionVersion string) string

GetInstallDir provides a mock function with given fields: moduleName, revisionVersion

func (*Storage) GetInstalledModuleHash

func (_m *Storage) GetInstalledModuleHash(moduleName string, revisionVersion string) (models.ModuleHash, error)

GetInstalledModuleHash provides a mock function with given fields: moduleName, revisionVersion

func (*Storage) Install

func (_m *Storage) Install(cacheDownloadPaths models.CacheDownloadPaths, module models.Module, revision models.Revision, moduleConfig models.ModuleConfig) (models.ModuleHash, error)

Install provides a mock function with given fields: cacheDownloadPaths, module, revision, moduleConfig

func (*Storage) IsModuleInstalled

func (_m *Storage) IsModuleInstalled(module models.Module) (bool, error)

IsModuleInstalled provides a mock function with given fields: module

type Storage_CreateCacheDownloadDir_Call

type Storage_CreateCacheDownloadDir_Call struct {
	*mock.Call
}

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

func (*Storage_CreateCacheDownloadDir_Call) Return

func (*Storage_CreateCacheDownloadDir_Call) Run

func (*Storage_CreateCacheDownloadDir_Call) RunAndReturn

type Storage_CreateCacheRepositoryDir_Call

type Storage_CreateCacheRepositoryDir_Call struct {
	*mock.Call
}

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

func (*Storage_CreateCacheRepositoryDir_Call) Return

func (*Storage_CreateCacheRepositoryDir_Call) Run

func (*Storage_CreateCacheRepositoryDir_Call) RunAndReturn

type Storage_Expecter

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

func (*Storage_Expecter) CreateCacheDownloadDir

func (_e *Storage_Expecter) CreateCacheDownloadDir(_a0 interface{}) *Storage_CreateCacheDownloadDir_Call

CreateCacheDownloadDir is a helper method to define mock.On call

  • _a0 models.CacheDownloadPaths

func (*Storage_Expecter) CreateCacheRepositoryDir

func (_e *Storage_Expecter) CreateCacheRepositoryDir(name interface{}) *Storage_CreateCacheRepositoryDir_Call

CreateCacheRepositoryDir is a helper method to define mock.On call

  • name string

func (*Storage_Expecter) GetCacheDownloadPaths

func (_e *Storage_Expecter) GetCacheDownloadPaths(module interface{}, revision interface{}) *Storage_GetCacheDownloadPaths_Call

GetCacheDownloadPaths is a helper method to define mock.On call

  • module models.Module
  • revision models.Revision

func (*Storage_Expecter) GetInstallDir

func (_e *Storage_Expecter) GetInstallDir(moduleName interface{}, revisionVersion interface{}) *Storage_GetInstallDir_Call

GetInstallDir is a helper method to define mock.On call

  • moduleName string
  • revisionVersion string

func (*Storage_Expecter) GetInstalledModuleHash

func (_e *Storage_Expecter) GetInstalledModuleHash(moduleName interface{}, revisionVersion interface{}) *Storage_GetInstalledModuleHash_Call

GetInstalledModuleHash is a helper method to define mock.On call

  • moduleName string
  • revisionVersion string

func (*Storage_Expecter) Install

func (_e *Storage_Expecter) Install(cacheDownloadPaths interface{}, module interface{}, revision interface{}, moduleConfig interface{}) *Storage_Install_Call

Install is a helper method to define mock.On call

  • cacheDownloadPaths models.CacheDownloadPaths
  • module models.Module
  • revision models.Revision
  • moduleConfig models.ModuleConfig

func (*Storage_Expecter) IsModuleInstalled

func (_e *Storage_Expecter) IsModuleInstalled(module interface{}) *Storage_IsModuleInstalled_Call

IsModuleInstalled is a helper method to define mock.On call

  • module models.Module

type Storage_GetCacheDownloadPaths_Call

type Storage_GetCacheDownloadPaths_Call struct {
	*mock.Call
}

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

func (*Storage_GetCacheDownloadPaths_Call) Return

func (*Storage_GetCacheDownloadPaths_Call) Run

func (*Storage_GetCacheDownloadPaths_Call) RunAndReturn

type Storage_GetInstallDir_Call

type Storage_GetInstallDir_Call struct {
	*mock.Call
}

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

func (*Storage_GetInstallDir_Call) Return

func (*Storage_GetInstallDir_Call) Run

func (_c *Storage_GetInstallDir_Call) Run(run func(moduleName string, revisionVersion string)) *Storage_GetInstallDir_Call

func (*Storage_GetInstallDir_Call) RunAndReturn

type Storage_GetInstalledModuleHash_Call

type Storage_GetInstalledModuleHash_Call struct {
	*mock.Call
}

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

func (*Storage_GetInstalledModuleHash_Call) Return

func (*Storage_GetInstalledModuleHash_Call) Run

func (_c *Storage_GetInstalledModuleHash_Call) Run(run func(moduleName string, revisionVersion string)) *Storage_GetInstalledModuleHash_Call

func (*Storage_GetInstalledModuleHash_Call) RunAndReturn

type Storage_Install_Call

type Storage_Install_Call struct {
	*mock.Call
}

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

func (*Storage_Install_Call) Return

func (*Storage_Install_Call) Run

func (_c *Storage_Install_Call) Run(run func(cacheDownloadPaths models.CacheDownloadPaths, module models.Module, revision models.Revision, moduleConfig models.ModuleConfig)) *Storage_Install_Call

type Storage_IsModuleInstalled_Call

type Storage_IsModuleInstalled_Call struct {
	*mock.Call
}

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

func (*Storage_IsModuleInstalled_Call) Return

func (*Storage_IsModuleInstalled_Call) Run

func (*Storage_IsModuleInstalled_Call) RunAndReturn

Jump to

Keyboard shortcuts

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