catalog

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package catalog declares the catalog schema shared by the agent and the repository tools. Keep it free of agent dependencies (config, download).

Index

Constants

This section is empty.

Variables

View Source
var ActionLabelKeys = []string{
	"install", "installing", "installed", "remove", "removing", "update", "cancel",
	"pending_install", "pending_remove",
}

ActionLabelKeys are the keys of custom_action_labels and of a harness placement's action_labels: Munki's, plus sofcat's cancel and the pending_install and pending_remove statuses of a queued request.

Functions

This section is empty.

Types

type AppxCheck

type AppxCheck struct {
	Name    string `yaml:"name,omitempty"`
	Version string `yaml:"version,omitempty"`
}

AppxCheck holds information about checking an installed AppX/MSIX package

type FileCheck

type FileCheck struct {
	Path        string `yaml:"path,omitempty"`
	Version     string `yaml:"version,omitempty"`
	ProductName string `yaml:"product_name,omitempty"`
	Hash        string `yaml:"hash,omitempty"`
}

FileCheck holds information about checking via a file

type InstallCheck

type InstallCheck struct {
	File     []FileCheck `yaml:"file,omitempty"`
	Script   string      `yaml:"script,omitempty"`
	Registry RegCheck    `yaml:"registry,omitempty"`
	Appx     AppxCheck   `yaml:"appx,omitempty"`
}

InstallCheck holds information about how to check the status of a catalog item

type InstallerItem

type InstallerItem struct {
	Type      string   `yaml:"type,omitempty"`
	Location  string   `yaml:"location,omitempty"`
	Hash      string   `yaml:"hash,omitempty"`
	PackageID string   `yaml:"package_id,omitempty"`
	Arguments []string `yaml:"arguments,omitempty"`
	// SuccessCodes are non-zero exit codes that still mean the action worked.
	// Unset, the type's defaults apply (msi and nupkg accept 1641 and 3010,
	// "success, restart required"); a list, even an empty one, replaces them.
	SuccessCodes []int `yaml:"success_codes,omitempty"`
	// Variants holds a zip item's archives: placement name, then OS (darwin
	// or windows). Only type zip uses it, in place of Location and Hash.
	Variants map[string]map[string]Variant `yaml:"variants,omitempty"`
}

InstallerItem holds information about how to install a catalog item

type Item

type Item struct {
	Name                string        `yaml:"-"`
	Dependencies        []string      `yaml:"dependencies,omitempty"`
	DisplayName         string        `yaml:"display_name,omitempty"`
	Check               InstallCheck  `yaml:"check,omitempty"`
	Installer           InstallerItem `yaml:"installer,omitempty"`
	Uninstaller         InstallerItem `yaml:"uninstaller,omitempty"`
	Version             string        `yaml:"version,omitempty"`
	BlockingApps        []string      `yaml:"blocking_apps,omitempty"`
	UpdateFor           []string      `yaml:"update_for,omitempty"`
	Description         string        `yaml:"description,omitempty"`
	Category            string        `yaml:"category,omitempty"`
	Section             string        `yaml:"section,omitempty"` // storefront tab; free text like Category
	Developer           string        `yaml:"developer,omitempty"`
	IconName            string        `yaml:"icon_name,omitempty"`
	RestartAction       string        `yaml:"restart_action,omitempty"`
	PreScript           string        `yaml:"preinstall_script,omitempty"`
	PostScript          string        `yaml:"postinstall_script,omitempty"`
	PreUninstallScript  string        `yaml:"preuninstall_script,omitempty"`
	PostUninstallScript string        `yaml:"postuninstall_script,omitempty"`
	// InstallableCondition is an expression over this machine's facts that
	// must be true for the item to be installed here (see site/src/content/docs/guides/conditions.md).
	InstallableCondition string `yaml:"installable_condition,omitempty"`
	// RequiresSoftware lists software the item needs and sofcat never
	// installs. While any is missing, installs and updates are deferred.
	RequiresSoftware []RequiredSoftware `yaml:"requires_software,omitempty"`
	// CustomActionLabels replaces the storefront's button and status labels,
	// keyed by ActionLabelKeys (Munki's keys plus cancel, pending_install and
	// pending_remove). A key it leaves out falls back to the item's
	// placements, then the built-in label.
	CustomActionLabels map[string]string `yaml:"custom_action_labels,omitempty"`
	// NotInstallable says why InstallableCondition rejected this machine. It is
	// set on the agent by conditions.Apply and is empty when the item may be
	// installed.
	NotInstallable string `yaml:"-"`
}

Item contains an individual entry from the catalog

type RegCheck

type RegCheck struct {
	Name    string `yaml:"name,omitempty"`
	Version string `yaml:"version,omitempty"`
}

RegCheck holds information about checking via registry

type RequiredSoftware added in v1.11.0

type RequiredSoftware struct {
	DisplayName string `yaml:"display_name,omitempty"`
	// Munki is a Munki item name, present when Munki's report lists it as installed.
	Munki string `yaml:"munki,omitempty"`
	// Chocolatey is a package id, present when %ProgramData%\chocolatey\lib\<id> exists.
	Chocolatey string `yaml:"chocolatey,omitempty"`
}

RequiredSoftware is one requires_software entry. Each OS checks its own key: Munki on macOS, Chocolatey on Windows; an OS with no key skips the entry.

type Variant added in v1.11.0

type Variant struct {
	Location string `yaml:"location,omitempty"`
	// Hash is the lowercase hex sha256 of the zip file.
	Hash string `yaml:"hash,omitempty"`
	// TreeHash is the tree hash of the zip's contents, "sha256:<hex>".
	TreeHash string `yaml:"tree_hash,omitempty"`
}

Variant is one zip archive of a zip item (see site/src/content/docs/guides/zip-items.md).

Jump to

Keyboard shortcuts

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