shared

package
v6.28.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(err error) error

func NewClient

func NewClient(config command.Config, ui command.UI, skipSSLValidation bool) *plugin.Client

NewClients creates a new V2 Cloud Controller client and UAA client using the passed in config.

Types

type AddPluginRepositoryError

type AddPluginRepositoryError struct {
	Name    string
	URL     string
	Message string
}

func (AddPluginRepositoryError) Error

func (_ AddPluginRepositoryError) Error() string

func (AddPluginRepositoryError) Translate

func (e AddPluginRepositoryError) Translate(translate func(string, ...interface{}) string) string

type Config

type Config interface {
	DialTimeout() time.Duration
	Verbose() (bool, []string)
}

type DownloadPluginHTTPError

type DownloadPluginHTTPError struct {
	Message string
}

func (DownloadPluginHTTPError) Error

func (_ DownloadPluginHTTPError) Error() string

func (DownloadPluginHTTPError) Translate

func (e DownloadPluginHTTPError) Translate(translate func(string, ...interface{}) string) string

type FetchingPluginInfoFromRepositoriesError

type FetchingPluginInfoFromRepositoriesError struct {
	Message        string
	RepositoryName string
}

func (FetchingPluginInfoFromRepositoriesError) Error

func (FetchingPluginInfoFromRepositoriesError) Translate

func (e FetchingPluginInfoFromRepositoriesError) Translate(translate func(string, ...interface{}) string) string

type FileNotFoundError

type FileNotFoundError struct {
	Path string
}

FileNotFoundError is returned when a local plugin binary is not found during installation.

func (FileNotFoundError) Error

func (_ FileNotFoundError) Error() string

func (FileNotFoundError) Translate

func (e FileNotFoundError) Translate(translate func(string, ...interface{}) string) string

type GettingPluginRepositoryError

type GettingPluginRepositoryError struct {
	Name    string
	Message string
}

GettingPluginRepositoryError is returned when there's an error accessing the plugin repository

func (GettingPluginRepositoryError) Error

func (GettingPluginRepositoryError) Translate

func (e GettingPluginRepositoryError) Translate(translate func(string, ...interface{}) string) string

type JSONSyntaxError

type JSONSyntaxError struct {
	Err error
}

func (JSONSyntaxError) Error

func (e JSONSyntaxError) Error() string

func (JSONSyntaxError) Translate

func (e JSONSyntaxError) Translate(translate func(string, ...interface{}) string) string

type NoCompatibleBinaryError

type NoCompatibleBinaryError struct {
}

NoCompatibleBinaryError is returned when a repository contains a specified plugin but not for the specified platform

func (NoCompatibleBinaryError) Error

func (e NoCompatibleBinaryError) Error() string

func (NoCompatibleBinaryError) Translate

func (e NoCompatibleBinaryError) Translate(translate func(string, ...interface{}) string) string

type NoPluginRepositoriesError

type NoPluginRepositoriesError struct{}

func (NoPluginRepositoriesError) Error

func (NoPluginRepositoriesError) Translate

func (e NoPluginRepositoriesError) Translate(translate func(string, ...interface{}) string) string

type PluginAlreadyInstalledError

type PluginAlreadyInstalledError struct {
	BinaryName string
	Name       string
	Version    string
}

PluginAlreadyInstalledError is returned when the plugin has the same name as an installed plugin.

func (PluginAlreadyInstalledError) Error

func (PluginAlreadyInstalledError) Translate

func (e PluginAlreadyInstalledError) Translate(translate func(string, ...interface{}) string) string

type PluginBinaryRemoveFailedError

type PluginBinaryRemoveFailedError struct {
	Err error
}

PluginBinaryRemoveFailedError is returned when the removal of a plugin binary fails.

func (PluginBinaryRemoveFailedError) Error

func (PluginBinaryRemoveFailedError) Translate

func (e PluginBinaryRemoveFailedError) Translate(translate func(string, ...interface{}) string) string

type PluginBinaryUninstallError

type PluginBinaryUninstallError struct {
	Err error
}

PluginBinaryUninstallError is returned when running the plugin's uninstall hook fails.

func (PluginBinaryUninstallError) Error

func (PluginBinaryUninstallError) Translate

func (e PluginBinaryUninstallError) Translate(translate func(string, ...interface{}) string) string

type PluginCommandsConflictError

type PluginCommandsConflictError struct {
	PluginName     string
	PluginVersion  string
	CommandNames   []string
	CommandAliases []string
}

PluginCommandConflictError is returned when a plugin command name conflicts with a native or existing plugin command name.

func (PluginCommandsConflictError) Error

func (PluginCommandsConflictError) Translate

func (e PluginCommandsConflictError) Translate(translate func(string, ...interface{}) string) string

type PluginInstallationCancelled

type PluginInstallationCancelled struct {
}

PluginInstallationCancelled is used to ignore the scenario when the user responds with 'no' when prompted to install plugin and exit 0.

func (PluginInstallationCancelled) Error

type PluginInvalidError

type PluginInvalidError struct {
	Err error
}

PluginInvalidError is returned with a plugin is invalid because it is missing a name or has 0 commands.

func (PluginInvalidError) Error

func (e PluginInvalidError) Error() string

func (PluginInvalidError) Translate

func (e PluginInvalidError) Translate(translate func(string, ...interface{}) string) string

type PluginNotFoundError

type PluginNotFoundError struct {
	PluginName string
}

func (PluginNotFoundError) Error

func (e PluginNotFoundError) Error() string

func (PluginNotFoundError) Translate

func (e PluginNotFoundError) Translate(translate func(string, ...interface{}) string) string

type PluginNotFoundInRepositoryError

type PluginNotFoundInRepositoryError struct {
	BinaryName     string
	PluginName     string
	RepositoryName string
}

func (PluginNotFoundInRepositoryError) Error

func (PluginNotFoundInRepositoryError) Translate

func (e PluginNotFoundInRepositoryError) Translate(translate func(string, ...interface{}) string) string

type PluginNotFoundOnDiskOrInAnyRepositoryError

type PluginNotFoundOnDiskOrInAnyRepositoryError struct {
	PluginName string
	BinaryName string
}

func (PluginNotFoundOnDiskOrInAnyRepositoryError) Error

func (PluginNotFoundOnDiskOrInAnyRepositoryError) Translate

func (e PluginNotFoundOnDiskOrInAnyRepositoryError) Translate(translate func(string, ...interface{}) string) string

type ProgressBarProxyReader

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

ProgressBarProxyReader wraps a progress bar in a ProxyReader interface.

func NewProgressBarProxyReader

func NewProgressBarProxyReader(writer io.Writer) *ProgressBarProxyReader

func (ProgressBarProxyReader) Finish

func (p ProgressBarProxyReader) Finish()

func (*ProgressBarProxyReader) Start

func (p *ProgressBarProxyReader) Start(size int64)

func (ProgressBarProxyReader) Wrap

func (p ProgressBarProxyReader) Wrap(reader io.Reader) io.ReadCloser

type RPCService

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

func NewRPCService

func NewRPCService(config Config, ui UI) (*RPCService, error)

func (RPCService) GetMetadata

func (r RPCService) GetMetadata(path string) (configv3.Plugin, error)

func (RPCService) Run

func (r RPCService) Run(path string, command string) error

type RepositoryNameTakenError

type RepositoryNameTakenError struct {
	Name string
}

RepositoryNameTakenError is returned when adding a plugin repository fails due to a repository already existing with the same name

func (RepositoryNameTakenError) Error

func (_ RepositoryNameTakenError) Error() string

func (RepositoryNameTakenError) Translate

func (e RepositoryNameTakenError) Translate(translate func(string, ...interface{}) string) string

type RepositoryNotRegisteredError

type RepositoryNotRegisteredError struct {
	Name string
}

func (RepositoryNotRegisteredError) Error

func (RepositoryNotRegisteredError) Translate

func (e RepositoryNotRegisteredError) Translate(translate func(string, ...interface{}) string) string

type UI

type UI interface {
	Writer() io.Writer
}

Jump to

Keyboard shortcuts

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