school

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: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNotFound

type ErrNotFound struct {
	ResourceType string
	Name         string
	Hint         string // e.g. "use 'school devices list' to see available devices"
}

ErrNotFound indicates a resource was not found by name during resolution.

func (*ErrNotFound) Error

func (e *ErrNotFound) Error() string

type Resolver

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

Resolver maps resource names to IDs/UUIDs. Results are cached per resource type to avoid redundant list calls within a single command.

func NewResolver

func NewResolver(client registry.SchoolClient) *Resolver

NewResolver creates a Resolver for the given School client.

func (*Resolver) ResolveAppID

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

ResolveAppID returns the ID for an app given its name.

func (*Resolver) ResolveClassUUID

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

ResolveClassUUID returns the UUID for a class given its name.

func (*Resolver) ResolveDeviceGroupID

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

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

func (*Resolver) ResolveDeviceUDID

func (r *Resolver) ResolveDeviceUDID(ctx context.Context, nameOrSerial string) (string, error)

ResolveDeviceUDID returns the UDID for a device given its name or serial number.

func (*Resolver) ResolveGroupID

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

ResolveGroupID returns the ID for a user group given its name.

func (*Resolver) ResolveIBeaconID

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

ResolveIBeaconID returns the ID for an iBeacon given its name.

func (*Resolver) ResolveLocationID

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

ResolveLocationID returns the ID for a location given its name.

func (*Resolver) ResolveProfileID

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

ResolveProfileID returns the ID for a profile given its name.

func (*Resolver) ResolveUserID

func (r *Resolver) ResolveUserID(ctx context.Context, nameOrEmail string) (int64, error)

ResolveUserID returns the ID for a user given their username or email.

Jump to

Keyboard shortcuts

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