installers

package
v0.0.0-...-dc902cf Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IAppInstaller

type IAppInstaller interface {
	Install()
	Uninstall()
	SupportedOs() []system.OsInfo
}

IAppInstaller should be able install and uninstall software

type IRegistry

type IRegistry interface {
	Register(installer IAppInstaller)
	FindInstaller(osInfo system.OsInfo) IAppInstaller
}

IRegistry is an interface of registry

type OperationType

type OperationType int

OperationType is an alias for operation types

const (
	// NotSpecified means that it hasn't been set
	NotSpecified OperationType = iota
	// Install for installation
	Install
	// Uninstall for deinstallation
	Uninstall
)

type Registry

type Registry struct {
	IRegistry
	// contains filtered or unexported fields
}

Registry contains all installers

func CreateRegistry

func CreateRegistry() *Registry

CreateRegistry function is a constructor

func (*Registry) FindInstaller

func (registry *Registry) FindInstaller(osInfo system.OsInfo) IAppInstaller

FindInstaller looks up for an appropriate installer

func (*Registry) Register

func (registry *Registry) Register(installer IAppInstaller)

Register an installer in the installers repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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