Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: BSD-3-Clause Imports: 24 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

func ComputeVMID added in v1.0.5

func ComputeVMID(vmName string) (ids.ID, error)

ComputeVMID computes the VMID for a VM name VMID = CB58(pad32(vmName))

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 InstallGitHub added in v1.9.5

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

InstallGitHub downloads a pre-compiled binary from GitHub releases.

func NewInstallGitHub added in v1.9.5

func NewInstallGitHub(config InstallGitHubConfig) *InstallGitHub

NewInstallGitHub creates a new GitHub release install workflow.

func (*InstallGitHub) Execute added in v1.9.5

func (g *InstallGitHub) Execute() error

Execute runs the GitHub release install workflow.

type InstallGitHubConfig added in v1.9.5

type InstallGitHubConfig struct {
	Owner     string
	Repo      string
	Tag       string
	VMID      string
	Pattern   string
	OS        string
	Arch      string
	PluginDir string
	Fs        afero.Fs
}

InstallGitHubConfig configures a GitHub release binary install.

type InstallGitLab added in v1.9.6

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

InstallGitLab downloads a pre-compiled binary from GitLab releases.

func NewInstallGitLab added in v1.9.6

func NewInstallGitLab(config InstallGitLabConfig) *InstallGitLab

NewInstallGitLab creates a new GitLab release install workflow.

func (*InstallGitLab) Execute added in v1.9.6

func (g *InstallGitLab) Execute() error

Execute runs the GitLab release install workflow.

type InstallGitLabConfig added in v1.9.6

type InstallGitLabConfig struct {
	Owner     string
	Repo      string
	Tag       string
	VMID      string
	Pattern   string
	OS        string
	Arch      string
	PluginDir string
	BaseURL   string // GitLab instance URL (default: https://gitlab.com)
	Token     string // Private token for authentication
	Fs        afero.Fs
}

InstallGitLabConfig configures a GitLab release binary install.

type InstallSource added in v1.9.5

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

InstallSource clones, builds, and installs a VM from source.

func NewInstallSource added in v1.9.5

func NewInstallSource(config InstallSourceConfig) *InstallSource

NewInstallSource creates a new source build install workflow.

func (*InstallSource) Execute added in v1.9.5

func (s *InstallSource) Execute() error

Execute runs the source install workflow.

type InstallSourceConfig added in v1.9.5

type InstallSourceConfig struct {
	Owner       string
	Repo        string
	Tag         string
	VMID        string
	BuildScript string
	BinaryPath  string
	OS          string
	Arch        string
	PluginDir   string
	Fs          afero.Fs
}

InstallSourceConfig configures a build-from-source install.

type InstallURL added in v1.9.5

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

InstallURL downloads a pre-compiled binary from a direct URL.

func NewInstallURL added in v1.9.5

func NewInstallURL(config InstallURLConfig) *InstallURL

NewInstallURL creates a new URL install workflow.

func (*InstallURL) Execute added in v1.9.5

func (u *InstallURL) Execute() error

Execute runs the URL install workflow.

type InstallURLConfig added in v1.9.5

type InstallURLConfig struct {
	URL       string
	VMID      string
	SHA256    string
	PluginDir string
	Fs        afero.Fs
}

InstallURLConfig configures a direct URL binary install.

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 Link struct {
	// contains filtered or unexported fields
}

Link creates a development symlink for a local VM binary

func NewLink(config LinkConfig) *Link

NewLink creates a new Link workflow

func (*Link) Execute added in v1.0.5

func (l *Link) Execute() error

Execute runs the link workflow

type LinkConfig added in v1.0.5

type LinkConfig struct {
	Org        string
	Name       string
	Version    string
	BinaryPath string
	PluginDir  string
	Fs         afero.Fs
}

LinkConfig contains configuration for linking a local VM binary

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

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

func NewRemoveRepository

func NewRemoveRepository(config RemoveRepositoryConfig) *RemoveRepository

func (RemoveRepository) Execute

func (r RemoveRepository) Execute() error

type RemoveRepositoryConfig

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