pkg

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package pkg provides helpful base interfaces and struct definitions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	Version string
	Emitter *emission.Emitter
}

Base struct from which every plugin should inherit

func (Base) Environment

func (base Base) Environment() (result []string, err error)

Environment returns list of the all needed envionment variables

func (Base) Info

func (base Base) Info() (result map[string]string)

Info provides all the info needed for installation of the plugin

func (Base) Install

func (base Base) Install() error

Install hook

func (base Base) Link() error

Link hook

func (Base) ListRemote

func (base Base) ListRemote() (result []string, err error)

ListRemote returns list of the all available remote versions

func (Base) PostInstall

func (base Base) PostInstall() error

PostInstall hook

func (Base) PreDownload

func (base Base) PreDownload() error

PreDownload hook

func (Base) PreInstall

func (base Base) PreInstall() error

PreInstall hook

func (Base) Rollback

func (base Base) Rollback() error

Rollback hook

func (Base) Switch

func (base Base) Switch() error

Switch hook

type Pkg

type Pkg interface {
	PreDownload() error
	PreInstall() error
	Install() error
	PostInstall() error
	Switch() error
	Link() error
	Rollback() error
	Events() *emission.Emitter
	Environment() ([]string, error)
	ListRemote() ([]string, error)
	Info() map[string]string
	Bins() []string
	Dots() []string
}

Pkg plugin interface

Jump to

Keyboard shortcuts

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