manifest

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: Apache-2.0 Imports: 10 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCatalogs

func GetCatalogs(cfg config.Configuration) (map[int]map[string]catalog.Item, error)

GetCatalogs returns a map of `catalog.Item` from the catalogs and any fatal catalog-loading error. It lives on the agent side so pkg/catalog stays a dependency-free schema package.

func SaveSelfServe

func SaveSelfServe(path string, entry Item) error

SaveSelfServe persists the self-serve manifest at path. It keeps the three self-serve lists (managed_installs, managed_uninstalls, default_installs) and drops includes/catalogs/updates, which the self-serve file never owns.

func SelfServePath

func SelfServePath(appDataPath string) string

SelfServePath returns the path to the self-serve manifest under appDataPath.

func UpdateSelfServe

func UpdateSelfServe(path string, fn func(*Item) bool) error

UpdateSelfServe loads the self-serve manifest at path, lets fn change it, and saves it when fn reports a change, all under one in-process lock. CEILING: the lock is per process. The service owns the file and runs every managed run in-process; a separate `sofcat` CLI run racing the service could still lose a write. Upgrade to a file lock if both ever write concurrently.

Types

type Item

type Item struct {
	Name             string   `yaml:"name"`
	Includes         []string `yaml:"included_manifests"`
	Installs         []string `yaml:"managed_installs"`
	OptionalInstalls []string `yaml:"optional_installs"`
	DefaultInstalls  []string `yaml:"default_installs"`
	Uninstalls       []string `yaml:"managed_uninstalls"`
	Updates          []string `yaml:"managed_updates"`
	Catalogs         []string `yaml:"catalogs"`
}

Item represents a single object from the manifest

func Get

func Get(cfg config.Configuration) (manifests []Item, newCatalogs []string, err error)

Get returns: 1) All manifest objects 2) Aditional catalogs that need to be added to the config 3) Any retrieval or parse error encountered while loading manifests

func LoadSelfServe

func LoadSelfServe(path string) (Item, error)

LoadSelfServe reads the self-serve manifest at path. A missing file returns a named empty manifest rather than an error.

Jump to

Keyboard shortcuts

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