Documentation ¶
Index ¶
- Constants
- Variables
- func NewTestPluginProvider() *client.TestPackageManager
- func Serve(interfaceName string, pluginImplementation plugin.Plugin)
- func ServeMany(pluginMap map[string]plugin.Plugin)
- type CommandOptions
- type Implementation
- type InstallOptions
- type Metadata
- type PackageManager
- type PluginKey
- type PluginProvider
- type PluginRunner
Constants ¶
View Source
const (
Directory = "plugins"
)
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "PORTER",
MagicCookieValue: "bbc2dd71-def4-4311-906e-e98dc27208ce",
}
HandshakeConfig is common handshake config between Porter and its plugins.
Functions ¶
func NewTestPluginProvider ¶
func NewTestPluginProvider() *client.TestPackageManager
NewTestPluginProvider helps us test Porter.Plugins in our unit tests without actually hitting any real plugins on the file system.
Types ¶
type CommandOptions ¶
type CommandOptions struct {
Command string
}
type Implementation ¶
type Implementation struct { Type string `json:"type" yaml:"type"` Name string `json:"implementation" yaml:"name"` }
Implementation stores implementation type (e.g. storage) and its name (e.g. s3, mongo)
type InstallOptions ¶
type InstallOptions struct {
pkgmgmt.InstallOptions
}
func (*InstallOptions) Validate ¶
func (o *InstallOptions) Validate(args []string) error
type Metadata ¶
type Metadata struct { pkgmgmt.Metadata `json:",inline" yaml:",inline"` Implementations []Implementation `json:"implementations" yaml:"implementations"` }
Metadata about an installed plugin.
type PackageManager ¶
type PackageManager struct {
*client.FileSystem
}
func NewPackageManager ¶
func NewPackageManager(c *config.Config) *PackageManager
type PluginKey ¶
func ParsePluginKey ¶
type PluginProvider ¶
type PluginProvider interface { pkgmgmt.PackageManager }
PluginProvider manages Porter's plugins: installing, listing, upgrading and general communication.
type PluginRunner ¶
func NewRunner ¶
func NewRunner(pluginName string) *PluginRunner
func (*PluginRunner) Run ¶
func (r *PluginRunner) Run(commandOpts CommandOptions) error
func (*PluginRunner) Validate ¶
func (r *PluginRunner) Validate() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.