mocks

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) EXPECT

func (_m *LockFile) EXPECT() *LockFile_Expecter

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_Expecter

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

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_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 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) 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) 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_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