workflow

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: BSD-3-Clause Imports: 19 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 map[string]*state.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

	StateFile  state.File
	Repository state.Repository
	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 RemoveRepository added in v1.0.0

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

func NewRemoveRepository added in v1.0.0

func NewRemoveRepository(config RemoveRepositoryConfig) *RemoveRepository

func (RemoveRepository) Execute added in v1.0.0

func (r RemoveRepository) Execute() error

type RemoveRepositoryConfig added in v1.0.0

type RemoveRepositoryConfig struct {
	SourcesList      map[string]*state.SourceInfo
	RepositoriesPath string
	Alias            string
}

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
	StateFile  state.File
	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
	TmpPath          string
	PluginPath       string
	Installer        Installer
	RepositoriesPath string
	Auth             http.BasicAuth
	RepoFactory      state.RepositoryFactory
	Fs               afero.Fs
	StateFile        state.File
	Git              git.Factory
}

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 state.RepositoryFactory
	StateFile   state.File

	TmpPath    string
	PluginPath string
	Installer  Installer
	Git        git.Factory
	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 state.RepositoryFactory
	StateFile   state.File

	TmpPath    string
	PluginPath string
	Installer  Installer
	Fs         afero.Fs
	Git        git.Factory
}

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