Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCatalogs ¶
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 ¶
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 ¶
SelfServePath returns the path to the self-serve manifest under appDataPath.
func UpdateSelfServe ¶
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 ¶
LoadSelfServe reads the self-serve manifest at path. A missing file returns a named empty manifest rather than an error.