common

package
v7.0.0-beta.26+incompa... Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 23 Imported by: 91

Documentation

Overview

Package common should not be imported by external consumers. It was not designed for external use.

Index

Constants

This section is empty.

Variables

View Source
var Commands commandList

Functions

This section is empty.

Types

type HelpActor

type HelpActor interface {
	// CommandInfoByName returns back a help command information for the given
	// command
	CommandInfoByName(interface{}, string) (sharedaction.CommandInfo, error)

	// CommandInfos returns a list of all commands
	CommandInfos(interface{}) map[string]sharedaction.CommandInfo
}

HelpActor handles the business logic of the help command

type HelpCommand

type HelpCommand struct {
	UI     command.UI
	Actor  HelpActor
	Config command.Config

	OptionalArgs flag.CommandName `positional-args:"yes"`
	AllCommands  bool             `short:"a" description:"All available CLI commands"`
	// contains filtered or unexported fields
}

func (HelpCommand) Execute

func (cmd HelpCommand) Execute(args []string) error

func (*HelpCommand) Setup

func (cmd *HelpCommand) Setup(config command.Config, ui command.UI) error

type InstallPluginActor

type InstallPluginActor interface {
	CreateExecutableCopy(path string, tempPluginDir string) (string, error)
	DownloadExecutableBinaryFromURL(url string, tempPluginDir string, proxyReader plugin.ProxyReader) (string, error)
	FileExists(path string) bool
	GetAndValidatePlugin(metadata pluginaction.PluginMetadata, commands pluginaction.CommandList, path string) (configv3.Plugin, error)
	GetPlatformString(runtimeGOOS string, runtimeGOARCH string) string
	GetPluginInfoFromRepositoriesForPlatform(pluginName string, pluginRepos []configv3.PluginRepository, platform string) (pluginaction.PluginInfo, []string, error)
	GetPluginRepository(repositoryName string) (configv3.PluginRepository, error)
	InstallPluginFromPath(path string, plugin configv3.Plugin) error
	UninstallPlugin(uninstaller pluginaction.PluginUninstaller, name string) error
	ValidateFileChecksum(path string, checksum string) bool
}

type InstallPluginCommand

type InstallPluginCommand struct {
	OptionalArgs         flag.InstallPluginArgs `positional-args:"yes"`
	SkipSSLValidation    bool                   `short:"k" hidden:"true" description:"Skip SSL certificate validation"`
	Force                bool                   `short:"f" description:"Force install of plugin without confirmation"`
	RegisteredRepository string                 `short:"r" description:"Restrict search for plugin to this registered repository"`

	UI          command.UI
	Config      command.Config
	Actor       InstallPluginActor
	ProgressBar plugin.ProxyReader
	// contains filtered or unexported fields
}

func (InstallPluginCommand) Execute

func (cmd InstallPluginCommand) Execute([]string) (err error)

func (*InstallPluginCommand) Setup

func (cmd *InstallPluginCommand) Setup(config command.Config, ui command.UI) error

type PluginSource

type PluginSource int
const (
	PluginFromRepository PluginSource = iota
	PluginFromLocalFile
	PluginFromURL
)

type V2CommandList

type V2CommandList struct {
}
var FallbackCommands V2CommandList

type VersionCommand

type VersionCommand struct {
	UI     command.UI
	Config command.Config
	// contains filtered or unexported fields
}

func (VersionCommand) Execute

func (cmd VersionCommand) Execute(args []string) error

func (*VersionCommand) Setup

func (cmd *VersionCommand) Setup(config command.Config, ui command.UI) error

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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