plugin

package
v4.0.0-pre12 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 14 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

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

Functions

func InitApp

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

func Leaving(e *models.Error)

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

func ListObjects

func ListObjects(prefix string) ([]*models.RawModel, *models.Error)

func Publish

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

Publish allows the plugin to generate events back to DRP.

Types

type PluginActor

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

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

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

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

type PluginStop

type PluginStop interface {
	Stop(logger.Logger)
}

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

type PluginUnpacker

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

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

type PluginValidator

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

Path Synopsis

Jump to

Keyboard shortcuts

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