env

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveEntry

type ActiveEntry struct {
	manifest.PkgEntry
	Source    string
	Installed bool
}

type ActiveEnvVar

type ActiveEnvVar struct {
	Key    string
	Value  string
	Source string
}

type ChangeSet added in v0.6.0

type ChangeSet struct {
	Added     []PkgChange
	Removed   []PkgChange
	Upgraded  []PkgChange
	Installed []PkgChange
	EnvSet    []manifest.EnvEntry
	EnvUnset  []string
}

ChangeSet summarizes what a mutating env operation changed, for the cmd layer to render. Manifest edits populate Added/Removed/Upgraded; installs with no manifest change (Refresh) populate Installed; env edits populate EnvSet/EnvUnset.

func (ChangeSet) Empty added in v0.6.0

func (c ChangeSet) Empty() bool

Empty reports whether the change set records nothing.

type Manager

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

func New

func New(pkgs *pkg.Manager, store *storage.Store) *Manager

func (*Manager) ActiveBinDirs

func (m *Manager) ActiveBinDirs() ([]string, error)

func (*Manager) ActiveDepTrees

func (m *Manager) ActiveDepTrees(ctx context.Context) ([]*pkg.DepTree, error)

func (*Manager) ActiveEnv

func (m *Manager) ActiveEnv() (map[string]ActiveEnvVar, error)

func (*Manager) ListActive

func (m *Manager) ListActive() ([]ActiveEntry, error)

func (*Manager) Refresh

func (m *Manager) Refresh(ctx context.Context) (ChangeSet, error)

func (*Manager) SetEnv

func (m *Manager) SetEnv(vars []Var, scope manifest.Scope) (ChangeSet, error)

func (*Manager) Tidy

func (m *Manager) Tidy(ctx context.Context, scope manifest.Scope) (ChangeSet, error)

func (*Manager) UnsetEnv

func (m *Manager) UnsetEnv(keys []string, scope manifest.Scope) (ChangeSet, error)

func (*Manager) Unuse

func (m *Manager) Unuse(ctx context.Context, pkgName string, scope manifest.Scope) (ChangeSet, error)

func (*Manager) Upgrade

func (m *Manager) Upgrade(ctx context.Context, scope manifest.Scope) (ChangeSet, error)

func (*Manager) Use

func (m *Manager) Use(ctx context.Context, refs pkg.Refs, scope manifest.Scope) (ChangeSet, error)

type PkgChange added in v0.6.0

type PkgChange struct {
	Name       string
	Version    string // resulting version
	OldVersion string // previous version (upgrades only)
	Direct     bool
}

PkgChange describes a single package delta for a change summary.

type Var

type Var struct {
	Key   string
	Value string
}

Jump to

Keyboard shortcuts

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