plugins

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPluginsToManifest

func AddPluginsToManifest(manifest *manifestType.Manifest, pluginLocations []string) (*manifestType.Manifest, error)

AddPluginsToManifest - Add all new plugin to the manifest update it if it's already there then write the manifest to disk

func ExtractParsersFromPlugins added in v0.3.0

func ExtractParsersFromPlugins(
	loadedPlugins []*PluginLoaded,
) (
	parsers map[string]kombustionTypes.ParserFunc,
)

ExtractParsersFromPlugins and ensure there are no clashes for plugin resource names

func GetCacheDir

func GetCacheDir() string

GetCacheDir - Get the users cache directory Make it if it doesn't exist

func InstallPlugins

func InstallPlugins() error

InstallPlugins - Get the lock file and then call installPluginsWithLock

Types

type PluginLoaded

type PluginLoaded struct {
	Config         apiTypes.Config
	InternalConfig struct {
		Prefix     string
		PathOnDisk string
	}

	// The Parser functions from the plugin
	Parsers *map[string]func(
		name string,
		data string,
	) []byte
}

PluginLoaded is a fully loaded plugin

func LoadDevPlugin

func LoadDevPlugin(
	pluginPath string,
) *PluginLoaded

LoadDevPlugin loads an arbitrary plugin for plugin developers, to ease plugin development. Only works with a kombustion binary that was built from source

func LoadPlugins

func LoadPlugins(manifestFile *manifest.Manifest, lockFile *lock.Lock) (loadedPlugins []*PluginLoaded)

LoadPlugins from a manifest and lockfile

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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