Documentation
¶
Index ¶
- type ErrNotFound
- type Resolver
- func (r *Resolver) ResolveAppID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveClassUUID(ctx context.Context, name string) (string, error)
- func (r *Resolver) ResolveDeviceGroupID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveDeviceUDID(ctx context.Context, nameOrSerial string) (string, error)
- func (r *Resolver) ResolveGroupID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveIBeaconID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveLocationID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveProfileID(ctx context.Context, name string) (int64, error)
- func (r *Resolver) ResolveUserID(ctx context.Context, nameOrEmail string) (int64, error)
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 ¶
ResolveAppID returns the ID for an app given its name.
func (*Resolver) ResolveClassUUID ¶
ResolveClassUUID returns the UUID for a class given its name.
func (*Resolver) ResolveDeviceGroupID ¶
ResolveDeviceGroupID returns the ID for a device group given its name.
func (*Resolver) ResolveDeviceUDID ¶
ResolveDeviceUDID returns the UDID for a device given its name or serial number.
func (*Resolver) ResolveGroupID ¶
ResolveGroupID returns the ID for a user group given its name.
func (*Resolver) ResolveIBeaconID ¶
ResolveIBeaconID returns the ID for an iBeacon given its name.
func (*Resolver) ResolveLocationID ¶
ResolveLocationID returns the ID for a location given its name.
func (*Resolver) ResolveProfileID ¶
ResolveProfileID returns the ID for a profile given its name.