api

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PackageInstallAction = action.SimpleActionBuilder[[]Package]{
	CreateRun: func(pkgs []Package) func() error {
		return func() error {
			for _, pkg := range pkgs {
				if err := pkg.Install(); err != nil {
					return err
				}
			}
			return nil
		}
	},
	String: func(pkgs []Package) string {
		packages := []string{}
		for _, pkg := range pkgs {
			packages = append(packages, fmt.Sprintf(" - %s", pkg.String()))
		}
		return fmt.Sprintf("Install system packages:\n%s", strings.Join(packages, "\n"))
	},
}.Init()

Functions

func AlacrittyCall

func AlacrittyCall(params AlacrittyConfig) error

func AlacrittyRun

func AlacrittyRun(params map[string]interface{}) error

Types

type AlacrittyConfig

type AlacrittyConfig struct {
	Command string
	Args    []string
	Cwd     string
}

type Package

type Package interface {
	Install() error
	String() string
}

type PackageInstaller

type PackageInstaller interface {
	EnsurePackagerAction(homedir string) action.Object
	UpgradePackages() error
	DevelopmentTools() Package
	ShellTools() Package
	Desktop() Package
}

Directories

Path Synopsis
git

Jump to

Keyboard shortcuts

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