provision: github.com/digitalrebar/provision/plugin Index | Files | Directories

package plugin

import "github.com/digitalrebar/provision/plugin"

Index

Package Files

plugin.go

Variables

var (

    // App is the global cobra command structure.
    App = &cobra.Command{
        Use:   "replaceme",
        Short: "Replace ME!",
    }
)

func InitApp Uses

func InitApp(use, short, version string, def *models.PluginProvider, pc PluginConfig)

InitApp initializes the plugin system and makes the base actions available in cobra CLI.

func Leaving Uses

func Leaving(e *models.Error)

Leaving allows the plugin to inform DRP that it is about to exit.

func Publish Uses

func Publish(t, a, k string, o interface{})

Publish allows the plugin to generate events back to DRP.

type PluginActor Uses

type PluginActor interface {
    Action(logger.Logger, *models.Action) (interface{}, *models.Error)
}

PluginActor defines the Action routine used to invoke actions by the plugin.

type PluginConfig Uses

type PluginConfig interface {
    Config(logger.Logger, *api.Client, map[string]interface{}) *models.Error
}

PluginConfig defines the Config routine used to configure a specific instance of a plugin.

type PluginPublisher Uses

type PluginPublisher interface {
    Publish(logger.Logger, *models.Event) *models.Error
}

PluginPublisher defines the Publish routine used to send events to a plugin.

type PluginStop Uses

type PluginStop interface {
    Stop(logger.Logger)
}

PluginStop defines the Stop routine used to inform a plugin that it should stop.

type PluginUnpacker Uses

type PluginUnpacker interface {
    Unpack(logger.Logger, string) error
}

PluginUnpacker defines the Unpack routine used to unpack embedded assets to the specified path.

type PluginValidator Uses

type PluginValidator interface {
    Validate(logger.Logger, *api.Client) (interface{}, *models.Error)
}

PluginValidator defines the Validate routine used to ensure that the environment is valid around the define timeframe.

Directories

PathSynopsis
mux

Package plugin imports 14 packages (graph). Updated 2018-05-30. Refresh now. Tools for package owners.