Documentation ¶
Overview ¶
Package shared should not be imported by external consumers. It was not designed for external use.
Index ¶
- func HandleError(err error) error
- func NewClient(config command.Config, ui command.UI, skipSSLValidation bool) *plugin.Client
- type AddPluginRepositoryError
- type Config
- type DownloadPluginHTTPError
- type FetchingPluginInfoFromRepositoriesError
- type FileNotFoundError
- type GettingPluginRepositoryError
- type JSONSyntaxError
- type NoCompatibleBinaryError
- type NoPluginRepositoriesError
- type PluginAlreadyInstalledError
- type PluginBinaryRemoveFailedError
- type PluginBinaryUninstallError
- type PluginCommandsConflictError
- type PluginInstallationCancelled
- type PluginInvalidError
- type PluginNotFoundError
- type PluginNotFoundInRepositoryError
- type PluginNotFoundOnDiskOrInAnyRepositoryError
- type ProgressBarProxyReader
- type RPCService
- type RepositoryNameTakenError
- type RepositoryNotRegisteredError
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleError ¶
Types ¶
type AddPluginRepositoryError ¶
func (AddPluginRepositoryError) Error ¶
func (_ AddPluginRepositoryError) Error() string
type DownloadPluginHTTPError ¶
type DownloadPluginHTTPError struct {
Message string
}
func (DownloadPluginHTTPError) Error ¶
func (_ DownloadPluginHTTPError) Error() string
type FetchingPluginInfoFromRepositoriesError ¶
func (FetchingPluginInfoFromRepositoriesError) Error ¶
func (_ FetchingPluginInfoFromRepositoriesError) Error() 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
type GettingPluginRepositoryError ¶
GettingPluginRepositoryError is returned when there's an error accessing the plugin repository
func (GettingPluginRepositoryError) Error ¶
func (_ GettingPluginRepositoryError) Error() string
type JSONSyntaxError ¶
type JSONSyntaxError struct {
Err error
}
func (JSONSyntaxError) Error ¶
func (e JSONSyntaxError) Error() 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
type NoPluginRepositoriesError ¶
type NoPluginRepositoriesError struct{}
func (NoPluginRepositoriesError) Error ¶
func (_ NoPluginRepositoriesError) Error() string
type PluginAlreadyInstalledError ¶
PluginAlreadyInstalledError is returned when the plugin has the same name as an installed plugin.
func (PluginAlreadyInstalledError) Error ¶
func (_ PluginAlreadyInstalledError) Error() string
type PluginBinaryRemoveFailedError ¶
type PluginBinaryRemoveFailedError struct {
Err error
}
PluginBinaryRemoveFailedError is returned when the removal of a plugin binary fails.
func (PluginBinaryRemoveFailedError) Error ¶
func (e PluginBinaryRemoveFailedError) Error() string
type PluginBinaryUninstallError ¶
type PluginBinaryUninstallError struct {
Err error
}
PluginBinaryUninstallError is returned when running the plugin's uninstall hook fails.
func (PluginBinaryUninstallError) Error ¶
func (e PluginBinaryUninstallError) Error() 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 (e PluginCommandsConflictError) Error() 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 ¶
func (_ PluginInstallationCancelled) Error() string
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
type PluginNotFoundError ¶
type PluginNotFoundError struct {
PluginName string
}
func (PluginNotFoundError) Error ¶
func (e PluginNotFoundError) Error() string
type PluginNotFoundInRepositoryError ¶
type PluginNotFoundInRepositoryError struct { BinaryName string PluginName string RepositoryName string }
func (PluginNotFoundInRepositoryError) Error ¶
func (e PluginNotFoundInRepositoryError) Error() string
type PluginNotFoundOnDiskOrInAnyRepositoryError ¶
func (PluginNotFoundOnDiskOrInAnyRepositoryError) Error ¶
func (e PluginNotFoundOnDiskOrInAnyRepositoryError) Error() 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)
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
type RepositoryNotRegisteredError ¶
type RepositoryNotRegisteredError struct {
Name string
}
func (RepositoryNotRegisteredError) Error ¶
func (_ RepositoryNotRegisteredError) Error() string