runner

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_PLUGIN_HOME = ".tf-exporter-plugins"
View Source
const PLUGIN_HOME = "TFE_PLUGIN_HOME"

Variables

View Source
var ErrPluginNotFound = errors.New("plugin not found")

Functions

func FindPluginsForCommand

func FindPluginsForCommand(cmdName string) ([][2]string, error)

func GetHTTPClient

func GetHTTPClient() *http.Client

func LoadPluginInfo

func LoadPluginInfo(pluginName string, integrity *PluginIntegrity) (plugin.PluginInformation, error)

func PluginDir added in v1.1.0

func PluginDir(pluginName string, create bool) (string, error)

func PluginHome

func PluginHome() (string, error)

Types

type BillOfMaterials

type BillOfMaterials struct {
	Name      string               `toml:"name"`
	Type      PluginType           `toml:"type"`
	Source    PluginSource         `toml:"source"`
	Version   plugin.Version       `toml:"version,omitempty"`
	Integrity *PluginIntegrity     `toml:"integrity,omitempty"`
	Provides  []plugin.CommandInfo `toml:"provides,omitempty"`
}

func LoadInstalledBOMs

func LoadInstalledBOMs() ([]BillOfMaterials, error)

func LoadPluginBOM added in v1.1.0

func LoadPluginBOM(pluginName string) (BillOfMaterials, error)

type PluginDefinition

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

func LoadPlugin

func LoadPlugin(pluginName string, integrity *PluginIntegrity) (PluginDefinition, error)

func (PluginDefinition) Kill

func (p PluginDefinition) Kill()

func (PluginDefinition) Plugin

func (p PluginDefinition) Plugin() (plugin.ExportPlugin, error)

func (PluginDefinition) PluginInfo

func (p PluginDefinition) PluginInfo() plugin.PluginInformation

type PluginIntegrity

type PluginIntegrity struct {
	Checksum  string `toml:"checksum"`
	Algorithm string `toml:"algorithm"`
}

type PluginSource

type PluginSource struct {
	Type string `toml:"type"`
	Name string `toml:"name"`
	URL  string `toml:"url,omitempty"`
}

type PluginType

type PluginType string
const (
	Native PluginType = "native"
	NodeJS PluginType = "nodejs"
	Python PluginType = "python"
	Java   PluginType = "java"
)

Jump to

Keyboard shortcuts

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