plugin

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package plugin provides the plugin side of the plugin mechanism. Individual plugins have to implement the provider interface, pass it to a new plugin instance, and call run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

Plugin implements a convenient helper to map the request to the given provider and return the response.

func New

func New(provider Provider, debug bool) *Plugin

New creates a new plugin.

func (*Plugin) Run

func (p *Plugin) Run() error

Run looks for the given request and executes it.

type Provider

type Provider interface {
	UserData(req plugin.UserDataRequest) (string, error)
}

Provider defines the interface each plugin has to implement for the retrieval of the userdata based on the given arguments.

Jump to

Keyboard shortcuts

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