inventory

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package inventory provides the global-installation view over the shared registry. It owns no persistence or independent state model.

Index

Constants

View Source
const (
	OperationNone    = registry.OperationNone
	OperationEnsure  = registry.OperationEnsure
	OperationRemove  = registry.OperationRemove
	OperationInspect = registry.OperationInspect
	OutcomeNone      = registry.OutcomeNone
	OutcomeCompleted = registry.OutcomeCompleted
	OutcomeFailed    = registry.OutcomeFailed
)
View Source
const SchemaID = registry.SchemaID

Variables

This section is empty.

Functions

func Projects

func Projects(store registry.Store) []registry.Status

Projects filters UnifiedStatus without opening or maintaining another store.

func UnifiedStatus

func UnifiedStatus(store registry.Store) []registry.Status

UnifiedStatus exposes both scopes from one registry store to new callers.

Types

type Inventory

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

Inventory is a mutable global projection over a caller-owned registry.Store. View is the production constructor; persistence remains exclusively owned by registry.Load and registry.Save.

func View

func View(store *registry.Store) Inventory

func (Inventory) Len

func (i Inventory) Len() int

func (Inventory) Lookup

func (i Inventory) Lookup(c cell.Cell) (Record, bool)

func (Inventory) Ordered

func (i Inventory) Ordered() []Record

func (*Inventory) Upsert

func (i *Inventory) Upsert(r Record) error

type Leaf

type Leaf = registry.Leaf

func NewLeaf

func NewLeaf(path artifact.Path, kind artifact.EntryType, mode artifact.Mode, digest artifact.Digest) (Leaf, error)

type Observation

type Observation = registry.Observation

func Absent

func Absent() Observation

func Installed

func Installed() Observation

func ParseObservation

func ParseObservation(v string) (Observation, error)

func Unknown

func Unknown() Observation

type Operation

type Operation = registry.Operation

type Outcome

type Outcome = registry.Outcome

type Record

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

Record is a global row from the shared registry.

func NewRecord

func NewRecord(in RecordInput) (Record, error)

func (Record) ArtifactID

func (r Record) ArtifactID() artifact.BundleID

func (Record) Cell

func (r Record) Cell() cell.Cell

func (Record) CreatedDirs

func (r Record) CreatedDirs() []artifact.Path

func (Record) Diagnostic

func (r Record) Diagnostic() string

func (Record) IsValid

func (r Record) IsValid() bool

func (Record) LastAction

func (r Record) LastAction() string

LastAction and LastOutcome are text projections retained for the existing status renderer; mutation and construction boundaries use typed values.

func (Record) LastOperation

func (r Record) LastOperation() Operation

func (Record) LastOutcome

func (r Record) LastOutcome() string

func (Record) Leaves

func (r Record) Leaves() []Leaf

func (Record) Managed

func (r Record) Managed() bool

func (Record) Observation

func (r Record) Observation() Observation

func (Record) Outcome

func (r Record) Outcome() Outcome

func (Record) Selector

func (r Record) Selector() Selector

func (Record) Source

func (r Record) Source() Source

func (Record) Strategy

func (r Record) Strategy() activation.StrategyKind

func (Record) Trust

func (r Record) Trust() Trust

func (Record) Version

func (r Record) Version() Version

type RecordInput

type RecordInput struct {
	Cell          cell.Cell
	Source        Source
	Strategy      activation.StrategyKind
	Managed       bool
	ArtifactID    artifact.BundleID
	Version       Version
	Selector      Selector
	Leaves        []Leaf
	CreatedDirs   []artifact.Path
	Observation   Observation
	Trust         Trust
	LastOperation Operation
	LastOutcome   Outcome
	Diagnostic    string
}

type Selector

type Selector = registry.Selector

func NewSelector

func NewSelector(value string) (Selector, error)

type Source

type Source = registry.Source

func HomeManagerSource

func HomeManagerSource() Source

func InstallerSource

func InstallerSource() Source

func ParseSource

func ParseSource(v string) (Source, error)

type Trust

type Trust = registry.Trust

func ParseTrust

func ParseTrust(v string) (Trust, error)

func TrustNotApplicable

func TrustNotApplicable() Trust

func TrustPending

func TrustPending() Trust

func TrustTrusted

func TrustTrusted() Trust

type Version

type Version = registry.Version

func NewVersion

func NewVersion(value string) (Version, error)

Jump to

Keyboard shortcuts

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