platform

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is returned when a resource name cannot be resolved to an ID.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound reports whether err is or wraps ErrNotFound.

func PrintList

func PrintList[T any](out registry.OutputFormatter, items []T) error

PrintList outputs a list of items through the CLI formatter.

func PrintOne

func PrintOne[T any](out registry.OutputFormatter, item T) error

PrintOne outputs a single item through the CLI formatter.

Types

type Resolver

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

Resolver maps human-readable names to IDs for Jamf Platform API resources. Caches are populated lazily on first use and shared within a single command.

func NewResolver

func NewResolver(client registry.PlatformClient) *Resolver

NewResolver creates a Resolver backed by the given Platform client.

func (*Resolver) ResolveBaselineID

func (r *Resolver) ResolveBaselineID(ctx context.Context, title string) (string, error)

ResolveBaselineID returns the ID for a baseline with the given title.

func (*Resolver) ResolveBenchmarkID

func (r *Resolver) ResolveBenchmarkID(ctx context.Context, title string) (string, error)

ResolveBenchmarkID returns the ID for a benchmark with the given title.

func (*Resolver) ResolveBlueprintID

func (r *Resolver) ResolveBlueprintID(ctx context.Context, name string) (string, error)

ResolveBlueprintID returns the ID for a blueprint with the given name.

func (*Resolver) ResolveDeviceGroupID

func (r *Resolver) ResolveDeviceGroupID(ctx context.Context, name string) (string, error)

ResolveDeviceGroupID returns the ID for a device group with the given name.

func (*Resolver) ResolveDeviceIDBySerial

func (r *Resolver) ResolveDeviceIDBySerial(ctx context.Context, serial string) (string, error)

ResolveDeviceIDBySerial returns the device ID for the given serial number.

Jump to

Keyboard shortcuts

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