Help us shape the future of Go! Take the 2026 Go Developer Survey

discovery

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Quiet bool

Quiet suppresses progress messages.

Functions

This section is empty.

Types

type EnrollmentCustomizationInfo

type EnrollmentCustomizationInfo struct {
	ID      string
	Name    string
	IconURL string
}

EnrollmentCustomizationInfo holds metadata for downloading the branding image.

type IconInfo

type IconInfo struct {
	ID       int
	Name     string
	URL      string
	Label    string // Terraform resource label (includes type hint + referencing resource label)
	RefLabel string // Label of the resource that references this icon
}

IconInfo holds metadata about a discovered icon for downloading.

type PackageInfo

type PackageInfo struct {
	PackageName string
	FileName    string
}

PackageInfo holds extra metadata about a package needed for post-processing.

type Resource

type Resource struct {
	JamfID string
	Name   string
	Label  string // Sanitized Terraform resource label
}

Resource represents a discovered Jamf Pro resource with its ID, name, and derived TF label.

type Results

type Results struct {
	Sites                             []Resource
	Buildings                         []Resource
	Categories                        []Resource
	Departments                       []Resource
	Scripts                           []Resource
	ComputerExtensionAttributes       []Resource
	Packages                          []Resource
	DockItems                         []Resource
	Printers                          []Resource
	NetworkSegments                   []Resource
	SmartComputerGroups               []Resource
	StaticComputerGroups              []Resource
	MacOSConfigurationProfiles        []Resource
	Policies                          []Resource
	Icons                             []Resource
	IconInfo                          map[string]IconInfo // icon ID -> metadata (for downloading)
	EnrollmentCustomizations          []Resource
	EnrollmentCustomizationInfo       map[string]EnrollmentCustomizationInfo // enrollment customization ID -> metadata (for image downloading)
	ComputerPrestages                 []Resource
	AdvancedComputerSearches          []Resource
	AppInstallers                     []Resource
	MacApplications                   []Resource
	DeviceEnrollments                 []Resource
	VolumePurchasingLocations         []Resource
	RestrictedSoftware                []Resource
	SmartMobileDeviceGroups           []Resource
	StaticMobileDeviceGroups          []Resource
	MobileDeviceConfigurationProfiles []Resource
	MobileDevicePrestages             []Resource
	MobileDeviceExtensionAttributes   []Resource
	AdvancedMobileDeviceSearches      []Resource
	APIIntegrations                   []Resource
	APIRoles                          []Resource
	Accounts                          []Resource
	Webhooks                          []Resource
	AccountGroups                     []Resource
	DiskEncryptionConfigurations      []Resource
	AllowedFileExtensions             []Resource
	LDAPServers                       []Resource
	MobileDeviceApplications          []Resource
	UserGroups                        []Resource
	SelfServiceBrandingMacOS          []Resource
	SelfServiceBrandingIOS            []Resource
	AdvancedUserSearches              []Resource

	// Singletons maps TF resource type -> single Resource for settings with no list API.
	Singletons map[string][]Resource
}

Results holds all discovered resources grouped by type.

func DiscoverAll

func DiscoverAll(client *jamfpro.Client, reg *registry.Registry, packageInfo map[string]string, filter map[string]bool, progressFn func()) (*Results, error)

DiscoverAll lists all supported resources from Jamf Pro and registers them in the dependency registry for later reference resolution. packageInfo is populated with package_name -> filename mappings for post-processing. filter optionally restricts which resource types to discover. If nil, all types are discovered. Filter keys use friendly names matching the ResourceDef.FilterKey values in pro/resources.go. progressFn is called after each resource type finishes discovery (may be nil).

Jump to

Keyboard shortcuts

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