workflow

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Overview

Package workflow is a generated GoMock package.

Package workflow is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyUpdated = errors.New("already up-to-date")

Functions

This section is empty.

Types

type AddRepository

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

func NewAddRepository

func NewAddRepository(config AddRepositoryConfig) *AddRepository

func (AddRepository) Execute

func (a AddRepository) Execute() error

type AddRepositoryConfig

type AddRepositoryConfig struct {
	SourcesList storage.Storage[storage.SourceInfo]
	Alias, URL  string
	Branch      plumbing.ReferenceName
}

type Executor

type Executor interface {
	Execute(Workflow) error
}

type Install

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

func NewInstall

func NewInstall(config InstallConfig) *Install

func (Install) Execute

func (i Install) Execute() error

type InstallConfig

type InstallConfig struct {
	Name         string
	Plugin       string
	Organization string
	Repo         string
	TmpPath      string
	PluginPath   string

	InstalledVMs storage.Storage[storage.InstallInfo]
	VMStorage    storage.Storage[storage.Definition[types.VM]]
	Fs           afero.Fs
	Installer    Installer
}

type Installer

type Installer interface {
	Download(url string, path string) error
	Decompress(source string, dest string) error
	// Install installs the VM. installScriptPath is a path relative to
	// workingDir.
	Install(workingDir string, args ...string) error
}

type MockExecutor

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

MockExecutor is a mock of Executor interface.

func NewMockExecutor

func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor

NewMockExecutor creates a new mock instance.

func (*MockExecutor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockExecutor) Execute

func (m *MockExecutor) Execute(arg0 Workflow) error

Execute mocks base method.

type MockExecutorMockRecorder

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

MockExecutorMockRecorder is the mock recorder for MockExecutor.

func (*MockExecutorMockRecorder) Execute

func (mr *MockExecutorMockRecorder) Execute(arg0 interface{}) *gomock.Call

Execute indicates an expected call of Execute.

type MockInstaller

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

MockInstaller is a mock of Installer interface.

func NewMockInstaller

func NewMockInstaller(ctrl *gomock.Controller) *MockInstaller

NewMockInstaller creates a new mock instance.

func (*MockInstaller) Decompress

func (m *MockInstaller) Decompress(source, dest string) error

Decompress mocks base method.

func (*MockInstaller) Download

func (m *MockInstaller) Download(url, path string) error

Download mocks base method.

func (*MockInstaller) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstaller) Install

func (m *MockInstaller) Install(workingDir string, args ...string) error

Install mocks base method.

type MockInstallerMockRecorder

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

MockInstallerMockRecorder is the mock recorder for MockInstaller.

func (*MockInstallerMockRecorder) Decompress

func (mr *MockInstallerMockRecorder) Decompress(source, dest interface{}) *gomock.Call

Decompress indicates an expected call of Decompress.

func (*MockInstallerMockRecorder) Download

func (mr *MockInstallerMockRecorder) Download(url, path interface{}) *gomock.Call

Download indicates an expected call of Download.

func (*MockInstallerMockRecorder) Install

func (mr *MockInstallerMockRecorder) Install(workingDir interface{}, args ...interface{}) *gomock.Call

Install indicates an expected call of Install.

type Uninstall

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

func NewUninstall

func NewUninstall(config UninstallConfig) *Uninstall

func (Uninstall) Execute

func (u Uninstall) Execute() error

type UninstallConfig

type UninstallConfig struct {
	Name         string
	Plugin       string
	RepoAlias    string
	VMStorage    storage.Storage[storage.Definition[types.VM]]
	InstalledVMs storage.Storage[storage.InstallInfo]
	Fs           afero.Fs
	PluginPath   string
}

type Update

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

func NewUpdate

func NewUpdate(config UpdateConfig) *Update

func (Update) Execute

func (u Update) Execute() error

type UpdateConfig

type UpdateConfig struct {
	Executor         Executor
	Registry         storage.Storage[storage.RepoList]
	InstalledVMs     storage.Storage[storage.InstallInfo]
	SourcesList      storage.Storage[storage.SourceInfo]
	DB               database.Database
	TmpPath          string
	PluginPath       string
	Installer        Installer
	RepositoriesPath string
	Auth             http.BasicAuth
	GitFactory       git.Factory
	RepoFactory      storage.RepositoryFactory
	Fs               afero.Fs
}

type UpdateRepository

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

func NewUpdateRepository

func NewUpdateRepository(config UpdateRepositoryConfig) *UpdateRepository

func (*UpdateRepository) Execute

func (u *UpdateRepository) Execute() error

type UpdateRepositoryConfig

type UpdateRepositoryConfig struct {
	RepoName       string
	RepositoryPath string

	AliasBytes []byte

	PreviousCommit plumbing.Hash
	LatestCommit   plumbing.Hash

	SourceInfo  storage.SourceInfo
	Repository  storage.Repository
	Registry    storage.Storage[storage.RepoList]
	SourcesList storage.Storage[storage.SourceInfo]

	Fs afero.Fs
}

type Upgrade

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

func NewUpgrade

func NewUpgrade(config UpgradeConfig) *Upgrade

func (*Upgrade) Execute

func (u *Upgrade) Execute() error

type UpgradeConfig

type UpgradeConfig struct {
	Executor Executor

	RepoFactory  storage.RepositoryFactory
	Registry     storage.Storage[storage.RepoList]
	SourcesList  storage.Storage[storage.SourceInfo]
	InstalledVMs storage.Storage[storage.InstallInfo]

	TmpPath    string
	PluginPath string
	Installer  Installer
	Fs         afero.Fs
}

type UpgradeVM

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

func NewUpgradeVM

func NewUpgradeVM(config UpgradeVMConfig) *UpgradeVM

func (*UpgradeVM) Execute

func (u *UpgradeVM) Execute() error

type UpgradeVMConfig

type UpgradeVMConfig struct {
	Executor Executor

	FullVMName   string
	RepoFactory  storage.RepositoryFactory
	InstalledVMs storage.Storage[storage.InstallInfo]

	TmpPath    string
	PluginPath string
	Installer  Installer
	Fs         afero.Fs
}

type VMInstaller

type VMInstaller struct {
	url.Client
	// contains filtered or unexported fields
}

func NewVMInstaller

func NewVMInstaller(config VMInstallerConfig) *VMInstaller

func (VMInstaller) Decompress

func (t VMInstaller) Decompress(source string, dest string) error

func (VMInstaller) Install

func (t VMInstaller) Install(workingDir string, args ...string) error

type VMInstallerConfig

type VMInstallerConfig struct {
	Fs        afero.Fs
	URLClient url.Client
}

type Workflow

type Workflow interface {
	Execute() error
}

Jump to

Keyboard shortcuts

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