installer

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstalledPackage

type InstalledPackage struct {
	Name    string
	Version string
}

InstalledPackage is a summary of an installed BDL package.

type Installer

type Installer struct {
	// contains filtered or unexported fields
}

Installer manages package installation into the fglpkg home directory.

func New

func New(home, githubToken string) *Installer

New creates an Installer rooted at home. The githubToken is used to authenticate downloads from private GitHub repos; pass "" if not needed.

func (*Installer) Install

func (i *Installer) Install(info *registry.PackageInfo) error

Install downloads, verifies, and unpacks a single BDL package.

func (*Installer) InstallAll

func (i *Installer) InstallAll(m *manifest.Manifest, projectDir string, forceResolve bool) error

InstallAll resolves or reads from the lock file, then installs every BDL package and Java JAR. If a valid lock file exists and matches the current environment, it is used directly (no network resolution needed). Pass forceResolve=true to bypass the lock and re-resolve from scratch (used by `fglpkg update`).

func (*Installer) InstallAllWithOptions added in v1.7.0

func (i *Installer) InstallAllWithOptions(m *manifest.Manifest, projectDir string, forceResolve bool, opts Options) error

InstallAllWithOptions is InstallAll with caller-controlled options.

func (*Installer) InstallJar

func (i *Installer) InstallJar(dep manifest.JavaDependency) error

InstallJar downloads and verifies a Java JAR into the jars directory. The JAR checksum field on JavaDependency is optional; if empty the integrity check is skipped (Maven Central is trusted by default).

func (*Installer) JarsDir

func (i *Installer) JarsDir() string

JarsDir returns the path where Java JARs are stored.

func (*Installer) List

func (i *Installer) List() ([]InstalledPackage, error)

List returns all currently installed BDL packages by scanning the packages dir.

func (*Installer) PackagesDir

func (i *Installer) PackagesDir() string

PackagesDir returns the path where BDL packages are installed.

func (*Installer) Remove

func (i *Installer) Remove(name string) error

Remove deletes a BDL package directory.

type Options added in v1.7.0

type Options struct {
	// Production skips dev-scoped packages and JARs. Optional entries are
	// still attempted.
	Production bool
}

Options controls optional install behaviour.

Jump to

Keyboard shortcuts

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