Versions in this module Expand all Collapse all v0 v0.0.4 Jan 23, 2023 v0.0.3 Aug 18, 2022 v0.0.2 Aug 17, 2022 Changes in this version + const ASSIGNED + const DeviceEnrolledTopic + const EMPTY + const PUSHED + const REMOVED + func MakeListDevicesEndpoint(svc Service) endpoint.Endpoint + func MakeRemoveDevicesEndpoint(svc Service) endpoint.Endpoint + func MarshalDevice(dev *Device) ([]byte, error) + func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption) + func UDIDCertAuthMiddleware(store UDIDCertAuthStore, logger log.Logger, warnOnly bool) mdm.Middleware + func UnmarshalDevice(data []byte, dev *Device) error + type DEPProfileStatus string + type Device struct + AssetTag string + AwaitingConfiguration bool + BootstrapToken []byte + BuildVersion string + Color string + DEPProfileAssignTime time.Time + DEPProfileAssignedBy string + DEPProfileAssignedDate time.Time + DEPProfilePushTime time.Time + DEPProfileStatus DEPProfileStatus + DEPProfileUUID string + Description string + DeviceName string + Enrolled bool + IMEI string + LastSeen time.Time + MEID string + Model string + ModelName string + OSVersion string + ProductName string + PushMagic string + SerialNumber string + Token string + UDID string + UUID string + UnlockToken string + type DeviceDTO struct + DEPProfileStatus DEPProfileStatus + EnrollmentStatus bool + LastSeen time.Time + SerialNumber string + UDID string + type DeviceService struct + func New(store Store) *DeviceService + func (svc *DeviceService) ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error) + func (svc *DeviceService) RemoveDevices(ctx context.Context, opt RemoveDevicesOptions) error + type DeviceWorkerStore interface + DeviceBySerial func(ctx context.Context, serial string) (*Device, error) + DeviceByUDID func(ctx context.Context, udid string) (*Device, error) + Save func(ctx context.Context, d *Device) error + type Endpoints struct + ListDevicesEndpoint endpoint.Endpoint + RemoveDevicesEndpoint endpoint.Endpoint + func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints + func (e Endpoints) ListDevices(ctx context.Context, opts ListDevicesOption) ([]DeviceDTO, error) + func (e Endpoints) RemoveDevices(ctx context.Context, Opts RemoveDevicesOptions) error + type ListDevicesOption struct + FilterSerial []string + FilterUDID []string + Page int + PerPage int + type RemoveDevicesOptions struct + Serials []string + UDIDs []string + type Service interface + ListDevices func(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error) + RemoveDevices func(ctx context.Context, opt RemoveDevicesOptions) error + func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error) + type Store interface + DeleteBySerial func(ctx context.Context, serial string) error + DeleteByUDID func(ctx context.Context, udid string) error + List func(ctx context.Context, opt ListDevicesOption) ([]Device, error) + type UDIDCertAuthStore interface + GetUDIDCertHash func(udid []byte) ([]byte, error) + SaveUDIDCertHash func(udid, certHash []byte) error + type Worker struct + func NewWorker(db DeviceWorkerStore, ps pubsub.PublishSubscriber, logger log.Logger) *Worker + func (w *Worker) Run(ctx context.Context) error