Documentation
¶
Index ¶
- Constants
- 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) mdm.Middleware
- func UnmarshalDevice(data []byte, dev *Device) error
- type DEPProfileStatus
- type Device
- type DeviceDTO
- type DeviceService
- type DeviceWorkerStore
- type Endpoints
- type ListDevicesOption
- type RemoveDevicesOptions
- type Service
- type Store
- type UDIDCertAuthStore
- type Worker
Constants ¶
View Source
const ( EMPTY DEPProfileStatus = "empty" ASSIGNED = "assigned" PUSHED = "pushed" REMOVED = "removed" )
DEPProfileStatus values
View Source
const DeviceEnrolledTopic = "mdm.DeviceEnrolled"
Variables ¶
This section is empty.
Functions ¶
func MakeListDevicesEndpoint ¶
func MakeRemoveDevicesEndpoint ¶ added in v1.3.1
func MarshalDevice ¶
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
func UDIDCertAuthMiddleware ¶ added in v1.5.0
func UDIDCertAuthMiddleware(store UDIDCertAuthStore, logger log.Logger) mdm.Middleware
func UnmarshalDevice ¶
Types ¶
type DEPProfileStatus ¶
type DEPProfileStatus string
DEPProfileStatus is the status of the DEP Profile can be either "empty", "assigned", "pushed", or "removed"
type Device ¶
type Device struct {
UUID string `db:"uuid"`
UDID string `db:"udid"`
SerialNumber string `db:"serial_number"`
OSVersion string `db:"os_version"`
BuildVersion string `db:"build_version"`
ProductName string `db:"product_name"`
IMEI string `db:"imei"`
MEID string `db:"meid"`
PushMagic string `db:"push_magic"`
AwaitingConfiguration bool `db:"awaiting_configuration"`
Token string `db:"token"`
UnlockToken string `db:"unlock_token"`
Enrolled bool `db:"enrolled"`
Description string `db:"description"`
Model string `db:"model"`
ModelName string `db:"model_name"`
DeviceName string `db:"device_name"`
Color string `db:"color"`
AssetTag string `db:"asset_tag"`
DEPProfileStatus DEPProfileStatus `db:"dep_profile_status"`
DEPProfileUUID string `db:"dep_profile_uuid"`
DEPProfileAssignTime time.Time `db:"dep_profile_assign_time"`
DEPProfilePushTime time.Time `db:"dep_profile_push_time"`
DEPProfileAssignedDate time.Time `db:"dep_profile_assigned_date"`
DEPProfileAssignedBy string `db:"dep_profile_assigned_by"`
LastSeen time.Time `db:"last_seen"`
}
type DeviceService ¶
type DeviceService struct {
// contains filtered or unexported fields
}
func New ¶
func New(store Store) *DeviceService
func (*DeviceService) ListDevices ¶
func (svc *DeviceService) ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error)
func (*DeviceService) RemoveDevices ¶ added in v1.3.1
func (svc *DeviceService) RemoveDevices(ctx context.Context, opt RemoveDevicesOptions) error
type DeviceWorkerStore ¶
type Endpoints ¶
type Endpoints struct {
ListDevicesEndpoint endpoint.Endpoint
RemoveDevicesEndpoint endpoint.Endpoint
}
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
func (Endpoints) ListDevices ¶
func (Endpoints) RemoveDevices ¶ added in v1.3.1
func (e Endpoints) RemoveDevices(ctx context.Context, Opts RemoveDevicesOptions) error
type ListDevicesOption ¶
type RemoveDevicesOptions ¶ added in v1.4.0
type Service ¶
type Service interface {
ListDevices(ctx context.Context, opt ListDevicesOption) ([]DeviceDTO, error)
RemoveDevices(ctx context.Context, opt RemoveDevicesOptions) error
}
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
type UDIDCertAuthStore ¶ added in v1.5.0
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
deviceproto
Package deviceproto is a generated protocol buffer package.
|
Package deviceproto is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.