plugins

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package plugins provides essential logic for installation of the plugins

Index

Constants

This section is empty.

Variables

View Source
var (

	// Plugins holds list of all supported plugins
	Plugins = []string{
		"node",
		"rust",
		"ruby",
		"go",
		"python",
		"elm",
	}
)

Functions

func SearchBin

func SearchBin(name string) string

SearchBin searches for the actual binary

Types

type Args

type Args struct {
	Language    string
	Version     string
	WithModules bool
}

Args is arguments struct for New() method

type Plugin

type Plugin struct {
	Version string
	Pkg     pkg.Pkg
	// contains filtered or unexported fields
}

Plugin essential struct

func New

func New(args *Args) *Plugin

New returns new plugin struct

func (*Plugin) Bins

func (plugin *Plugin) Bins() []string

Bins returns list of the all bins included with the distribution of the language

func (*Plugin) Current

func (plugin *Plugin) Current() string

Current returns current used version

func (*Plugin) Done

func (plugin *Plugin) Done() (err error)

Done finishes installation

func (*Plugin) Dots

func (plugin *Plugin) Dots() []string

Dots returns list of the all available filenames which can define versions

func (*Plugin) Download

func (plugin *Plugin) Download() (*grab.Response, error)

Download the plugin

func (*Plugin) Environment

func (plugin *Plugin) Environment() ([]string, error)

Environment returns list of the all needed envionment variables

func (*Plugin) Events

func (plugin *Plugin) Events() *emission.Emitter

Events returns language related event emitter

func (*Plugin) Extract

func (plugin *Plugin) Extract() error

Extract raw files from the downloaded archive (its always an archive)

func (*Plugin) Info

func (plugin *Plugin) Info() (map[string]string, error)

Info provides all the info needed for installation of the plugin

func (*Plugin) Install

func (plugin *Plugin) Install() (err error)

Install the plugin

func (*Plugin) Interrupt

func (plugin *Plugin) Interrupt()

Interrupt handles interruption signals (like CTRL+C)

func (*Plugin) IsInstalled

func (plugin *Plugin) IsInstalled() bool

IsInstalled checks if this version was already installed

func (plugin *Plugin) Link() (err error)

Link replaces (if needed) and sets symlink for the language

func (*Plugin) List

func (plugin *Plugin) List() (vers []string)

List returns list of the all available local versions

func (*Plugin) ListRemote

func (plugin *Plugin) ListRemote() (map[string][]string, error)

ListRemote returns list of the all available remote versions

func (*Plugin) LocalInstall

func (plugin *Plugin) LocalInstall() (err error)

LocalInstall installs language locally - to the current pwd folder

func (*Plugin) PostInstall

func (plugin *Plugin) PostInstall() (err error)

PostInstall executes logic after installation of the plugin

func (*Plugin) PreDownload

func (plugin *Plugin) PreDownload() error

PreDownload executes logic before downloading of the plugin

func (*Plugin) PreInstall

func (plugin *Plugin) PreInstall() error

PreInstall executes logic before installation of the plugin

func (*Plugin) Proxy

func (plugin *Plugin) Proxy() (err error)

Proxy installs the proxy for the language

func (*Plugin) Remove

func (plugin *Plugin) Remove() (err error)

Remove the plugin

func (*Plugin) Rollback

func (plugin *Plugin) Rollback()

Rollback places everything back as it was for this language & version

func (*Plugin) Switch

func (plugin *Plugin) Switch() (err error)

Switch executes logic before switching plugin versions

Directories

Path Synopsis
Package elm provides all needed logic for installation of Elm
Package elm provides all needed logic for installation of Elm
Package golang provides all needed logic for installation of Golang
Package golang provides all needed logic for installation of Golang
Package nodejs provides all needed logic for installation of node.js
Package nodejs provides all needed logic for installation of node.js
modules
Package modules is a way for installation node modules for node.js plugin
Package modules is a way for installation node modules for node.js plugin
Package python provides all needed logic for installation of python
Package python provides all needed logic for installation of python
patch
Package patch provides logic for applying patches for the python installation
Package patch provides logic for applying patches for the python installation
Package ruby provides all needed logic for installation of ruby
Package ruby provides all needed logic for installation of ruby
bin
Package bin provides ruby binary plugin
Package bin provides ruby binary plugin
compile
Package compile provides ruby compilation plugin
Package compile provides ruby compilation plugin
rvm
Package rust provides all needed logic for installation of rust
Package rust provides all needed logic for installation of rust

Jump to

Keyboard shortcuts

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