Documentation
¶
Index ¶
- Variables
- func IsNotFound(err error) bool
- func PrintList[T any](out registry.OutputFormatter, items []T) error
- func PrintOne[T any](out registry.OutputFormatter, item T) error
- type Resolver
- func (r *Resolver) ResolveBaselineID(ctx context.Context, title string) (string, error)
- func (r *Resolver) ResolveBenchmarkID(ctx context.Context, title string) (string, error)
- func (r *Resolver) ResolveBlueprintID(ctx context.Context, name string) (string, error)
- func (r *Resolver) ResolveDeviceGroupID(ctx context.Context, name string) (string, error)
- func (r *Resolver) ResolveDeviceIDBySerial(ctx context.Context, serial string) (string, error)
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 ¶
IsNotFound reports whether err is or wraps ErrNotFound.
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 ¶
ResolveBaselineID returns the ID for a baseline with the given title.
func (*Resolver) ResolveBenchmarkID ¶
ResolveBenchmarkID returns the ID for a benchmark with the given title.
func (*Resolver) ResolveBlueprintID ¶
ResolveBlueprintID returns the ID for a blueprint with the given name.
func (*Resolver) ResolveDeviceGroupID ¶
ResolveDeviceGroupID returns the ID for a device group with the given name.
Click to show internal directories.
Click to hide internal directories.