plugins

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

View Source
const (

	// TerraformCustomPluginCacheDir is the directory used by terraform to search for custom providers
	// We vendor providers here
	// See https://www.terraform.io/docs/configuration/providers.html#third-party-plugins
	TerraformCustomPluginCacheDir = "terraform.d/plugins/{{.OS}}_{{.Arch}}"
	// CustomPluginDir where we place custom binaries
	CustomPluginDir = ".fogg/bin"
)

Variables

This section is empty.

Functions

func GetPluginCache added in v0.28.0

func GetPluginCache(cacheDir string) *diskv.Diskv

GetPluginCache returns the cache used for plugins

func Template added in v0.18.0

func Template(url, os, arch string) (string, error)

Template templatizes a url with os and arch information

Types

type CustomPlugin

type CustomPlugin struct {
	URL       string           `validate:"required"`
	Format    TypePluginFormat `validate:"required"`
	TarConfig *TarConfig       `yaml:"tar_config,omitempty"`
	TargetDir string           `yaml:"target_dir,omitempty"`
	// contains filtered or unexported fields
}

CustomPlugin is a custom plugin

func (*CustomPlugin) Install

func (cp *CustomPlugin) Install(fs afero.Fs, pluginName string) error

Install installs the custom plugin

func (*CustomPlugin) WithCache added in v0.28.0

func (cp *CustomPlugin) WithCache(cache *diskv.Diskv) *CustomPlugin

WithCache adds a cache to plugins

func (*CustomPlugin) WithTargetPath added in v0.28.0

func (cp *CustomPlugin) WithTargetPath(path string) *CustomPlugin

WithTargetPath sets the target path for this plugin

type TarConfig added in v0.19.3

type TarConfig struct {
	StripComponents int `yaml:"strip_components,omitempty"`
}

TarConfig configures the tar unpacking

type TypePluginFormat

type TypePluginFormat string

TypePluginFormat is the plugin format such as binary, zip, tar

const (
	// TypePluginFormatTar is a tar archived plugin
	TypePluginFormatTar TypePluginFormat = "tar"
	// TypePluginFormatBin is a binary plugin
	TypePluginFormatBin TypePluginFormat = "bin"
	// TypePluginFormatZip is a zip archive plugin
	TypePluginFormatZip TypePluginFormat = "zip"
)

Jump to

Keyboard shortcuts

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