Documentation ¶
Index ¶
- Variables
- func BumpDeviceLastUpdated(udid string)
- type AcknowledgeEvent
- type Certificate
- type CertificateList
- type CertificateListData
- type CheckinEvent
- type Command
- type CommandPayload
- type CommandResponse
- type DeleteProfilePayload
- type DeletedMobileconfigPayload
- type Device
- type DeviceCommandPayload
- type DeviceFromMDM
- type DeviceInformationQueryResponses
- type DeviceInstallApplication
- type DeviceProfile
- type DevicesFromMDM
- type EscrowPayload
- type FirewallSettings
- type FirmwarePasswordStatus
- type InstallApplicationPayload
- type ManagementStatus
- type ManifestURL
- type MetadataItem
- type OSUpdateSettings
- type PostPayload
- type ProfileList
- type ProfileListData
- type ProfileMetadata
- type ProfilePayload
- type SecureBoot
- type SecureBootReducedSecurity
- type SecurityInfo
- type SecurityInfoData
- type SharedInstallApplication
- type SharedProfile
- type UnlockPin
Constants ¶
This section is empty.
Variables ¶
View Source
var DeviceInformationQueries = []string{"ActiveManagedUsers", "AppAnalyticsEnabled", "AutoSetupAdminAccounts", "AvailableDeviceCapacity", "AwaitingConfiguration", "BatteryLevel", "BluetoothMAC", "BuildVersion", "CarrierSettingsVersion", "CellularTechnology", "CurrentMCC", "CurrentMNC", "DataRoamingEnabled", "DeviceCapacity", "DeviceID", "DeviceName", "DiagnosticSubmissionEnabled", "EASDeviceIdentifier", "ICCID", "IMEI", "IsActivationLockEnabled", "IsCloudBackupEnabled", "IsDeviceLocatorServiceEnabled", "IsDoNotDisturbInEffect", "IsMDMLostModeEnabled", "IsMultiUser", "IsNetworkTethered", "IsRoaming", "IsSupervised", "iTunesStoreAccountHash", "iTunesStoreAccountIsActive", "LastCloudBackupDate", "MaximumResidentUsers", "MDMOptions", "MEID", "Model", "ModelName", "ModemFirmwareVersion", "OrganizationInfo", "OSUpdateSettings", "OSVersion", "PersonalHotspotEnabled", "PhoneNumber", "ProductName", "PushToken", "SerialNumber", "ServiceSubscriptions", "SIMCarrierNetwork", "SIMMCC", "SIMMNC", "SubscriberCarrierNetwork", "SubscriberMCC", "SubscriberMNC", "SystemIntegrityProtectionEnabled", "UDID", "VoiceRoamingEnabled", "WiFiMAC", "EthernetMAC"}
Functions ¶
func BumpDeviceLastUpdated ¶
func BumpDeviceLastUpdated(udid string)
Types ¶
type AcknowledgeEvent ¶
type Certificate ¶
type Certificate struct { ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()"` CommonName string Subject string NotAfter time.Time NotBefore time.Time Data []byte Issuer string DeviceUDID string }
Certificate represents a certificate.
type CertificateList ¶
type CertificateList struct { CommonName string `plist:"CommonName"` Data []byte `plist:"Data"` IsIdentity bool `plist:"IsIdentity"` }
CertificateList Each item from CertificateList
type CertificateListData ¶
type CertificateListData struct {
CertificateList []CertificateList
}
CertificateListData - returned data from the CertificateList MDM command
type CheckinEvent ¶
type Command ¶
type Command struct { UpdatedAt time.Time CommandUUID string `gorm:"primaryKey"` Status string DeviceUDID string `json:"udid"` RequestType string `json:"request_type"` Payload string `json:"payload,omitempty"` Queries pq.StringArray `json:"Queries,omitempty" gorm:"type:text[]"` Identifier string `json:"identifier,omitempty"` ManifestURL string `json:"manifest_url,omitempty"` ErrorString string AttemptCount int }
type CommandPayload ¶
type CommandPayload struct { UDID string `json:"udid"` RequestType string `json:"request_type"` Payload string `json:"payload,omitempty"` Queries []string `json:"Queries,omitempty"` Identifier string `json:"identifier,omitempty"` ManifestURL string `json:"manifest_url,omitempty"` Pin string `json:"pin,omitempty"` }
type CommandResponse ¶
type CommandResponse struct { Payload struct { CommandUUID string `json:"command_uuid"` Command CommandPayload } `json:"payload"` }
type DeleteProfilePayload ¶
type DeleteProfilePayload struct { SerialNumbers []string `json:"serial_numbers,omitempty"` DeviceUDIDs []string `json:"udids,omitempty"` PushNow bool `json:"push_now"` Mobileconfigs []DeletedMobileconfigPayload `json:"profiles"` Metadata bool `json:"metadata"` }
type DeletedMobileconfigPayload ¶
type DeletedMobileconfigPayload struct {
PayloadIdentifier string `json:"payload_identifier"`
}
type Device ¶
type Device struct { DeviceName string BuildVersion string ModelName string Model string OSVersion string ProductName string SerialNumber string DeviceCapacity float32 AvailableDeviceCapacity float32 BatteryLevel float32 CellularTechnology int IMEI string MEID string ModemFirmwareVersion string IsSupervised bool IsDeviceLocatorServiceEnabled bool IsActivationLockEnabled bool IsDoNotDisturbInEffect bool DeviceID string EASDeviceIdentifier string IsCloudBackupEnabled bool OSUpdateSettings OSUpdateSettings `gorm:"foreignKey:DeviceUDID" json:",omitempty"` LocalHostName string HostName string SystemIntegrityProtectionEnabled bool // ActiveManagedUsers []string AppAnalyticsEnabled bool // AutoSetupAdminAccounts interface IsMDMLostModeEnabled bool AwaitingConfiguration bool `gorm:"default:false"` MaximumResidentUsers int BluetoothMAC string CarrierSettingsVersion string CurrentCarrierNetwork string CurrentMCC string CurrentMNC string DataRoamingEnabled string DiagnosticSubmissionEnabled bool ICCID string IsMultiUser bool IsNetworkTethered bool IsRoaming bool LastCloudBackupDate time.Time //MDMOptions string // EthernetMACs []string // OrganizationInfo interface{} PersonalHotspotEnabled bool PhoneNumber string PushToken string // ServiceSubscriptions interface{} SIMCarrierNetwork string SIMMCC string SIMMNC string SubscriberCarrierNetwork string SubscriberMCC string SubscriberMNC string VoiceRoamingEnabled bool WiFiMAC string EthernetMAC string UDID string `gorm:"primaryKey"` Active bool Profiles []DeviceProfile `gorm:"foreignKey:DeviceUDID" json:",omitempty"` Commands []Command `gorm:"foreignKey:DeviceUDID" json:",omitempty"` Certificates []Certificate `gorm:"foreignKey:DeviceUDID" json:",omitempty"` InstallApplications []DeviceInstallApplication `gorm:"foreignKey:DeviceUDID" json:",omitempty"` SecurityInfo SecurityInfo `gorm:"foreignKey:DeviceUDID" json:",omitempty"` ProfileList []ProfileList `gorm:"foreignKey:DeviceUDID" json:",omitempty"` UpdatedAt time.Time AuthenticateRecieved bool `gorm:"default:false"` TokenUpdateRecieved bool `gorm:"default:false"` InitialTasksRun bool `gorm:"default:false"` Erase bool `gorm:"default:false"` Lock bool `gorm:"default:false"` UnlockPin string TempUnlockPin UnlockPin `gorm:"foreignKey:DeviceUDID"` LastInfoRequested time.Time NextPush time.Time // LastScheduledPush time.Time LastCheckedIn time.Time LastCertificateList time.Time LastProfileList time.Time LastDeviceInfo time.Time LastSecurityInfo time.Time // contains filtered or unexported fields }
func (*Device) UpdateLastCertificateList ¶ added in v0.0.8
func (*Device) UpdateLastDeviceInfo ¶ added in v0.0.8
func (*Device) UpdateLastProfileList ¶ added in v0.0.8
func (*Device) UpdateLastSecurityInfo ¶ added in v0.0.8
type DeviceCommandPayload ¶
type DeviceFromMDM ¶
type DeviceInformationQueryResponses ¶
type DeviceInformationQueryResponses struct {
QueryResponses Device `plist:"QueryResponses"`
}
type DeviceProfile ¶
type DeviceProfile struct { // ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()"` PayloadUUID string PayloadIdentifier string `gorm:"primaryKey"` HashedPayloadUUID string MobileconfigData []byte MobileconfigHash []byte DeviceUDID string `gorm:"primaryKey"` Installed bool `gorm:"default:true"` }
DeviceProfile (s) are profiles that are individual to the device.
func (*DeviceProfile) AfterCreate ¶
func (profile *DeviceProfile) AfterCreate(tx *gorm.DB) (err error)
func (*DeviceProfile) AfterUpdate ¶
func (profile *DeviceProfile) AfterUpdate(tx *gorm.DB) (err error)
type DevicesFromMDM ¶
type DevicesFromMDM struct {
Devices []DeviceFromMDM `json:"devices"`
}
type EscrowPayload ¶
type FirewallSettings ¶ added in v0.0.8
type FirewallSettings struct { // FirewallSettingsApplications []FirewallSettingsApplication `plist:"Applications"gorm"foreignKey:DeviceUDID"` BlockAllIncoming bool `plist:"BlockAllIncoming"` FirewallEnabled bool `plist:"FirewallEnabled"` StealthMode bool `plist:"StealthMode"` DeviceUDID string `gorm:"primaryKey"` }
type FirmwarePasswordStatus ¶
type InstallApplicationPayload ¶
type InstallApplicationPayload struct { SerialNumbers []string `json:"serial_numbers,omitempty"` DeviceUDIDs []string `json:"udids,omitempty"` ManifestURLs []ManifestURL `json:"manifest_urls"` }
type ManagementStatus ¶
type ManifestURL ¶
type MetadataItem ¶
type MetadataItem struct { // Device Device `json:"device"` ProfileMetadata []ProfileMetadata `json:"profile_metadata"` }
type OSUpdateSettings ¶
type OSUpdateSettings struct { DeviceUDID string `gorm:"primaryKey"` CatalogURL string IsDefaultCatalog bool PreviousScanDate time.Time PreviousScanResult int PerformPeriodicCheck bool AutomaticCheckEnabled bool BackgroundDownloadEnabled bool AutomaticAppInstallationEnabled bool AutomaticOSInstallationEnabled bool AutomaticSecurityUpdatesEnabled bool }
type PostPayload ¶
type PostPayload struct { Topic string `json:"topic"` EventID string `json:"event_id"` CheckinEvent *CheckinEvent `json:"checkin_event,omitempty"` AcknowledgeEvent *AcknowledgeEvent `json:"acknowledge_event,omitempty"` }
type ProfileList ¶
type ProfileList struct { ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()"` DeviceUDID string HasRemovalPasscode bool `plist:"HasRemovalPasscode"` IsEncrypted bool `plist:"IsEncrypted"` IsManaged bool `plist:"IsManaged"` PayloadContent []interface{} `plist:"PaylodContent" gorm:"-"` PayloadDescription string `plist:"PayloadDescription"` PayloadDisplayName string `plist:"PayloadDisplayName"` PayloadIdentifier string `plist:"PayloadIdentifier"` PayloadOrganization string `plist:"PayloadOrganization"` PayloadRemovalDisallowed bool `plist:"PayloadRemovalDisallowed"` PayloadUUID string `plist:"PayloadUUID" gorm:"not null"` PayloadVersion int `plist:"PayloadVersion"` FullPayload bool `plist:"FullPayload"` }
type ProfileListData ¶
type ProfileListData struct {
ProfileList []ProfileList
}
ProfileList - returned data from the ProfileList MDM command
type ProfileMetadata ¶
type ProfilePayload ¶
type ProfilePayload struct { SerialNumbers []string `json:"serial_numbers,omitempty"` DeviceUDIDs []string `json:"udids,omitempty"` Mobileconfigs []string `json:"profiles"` PushNow bool `json:"push_now"` Metadata bool `json:"metadata"` }
ProfilePayload - struct to unpack the payload sent to mdmdirector
type SecureBoot ¶ added in v0.0.8
type SecureBoot struct { ExternalBootLevel string `plist:"ExternalBootLevel"` SecureBootLevel string `plist:"SecureBootLevel"` SecureBootReducedSecurity SecureBootReducedSecurity `plist:"ReducedSecurity" gorm:"foreignKey:DeviceUDID"` DeviceUDID string `gorm:"primaryKey"` }
type SecureBootReducedSecurity ¶ added in v0.0.8
type SecurityInfo ¶
type SecurityInfo struct { AuthenticatedRootVolumeEnabled bool `plist:"AuthenticatedRootVolumeEnabled"` BootstrapTokenAllowedForAuthentication string `plist:"BootstrapTokenAllowedForAuthentication"` BootstrapTokenRequiredForKernelExtensionApproval bool `plist:"BootstrapTokenRequiredForKernelExtensionApproval"` BootstrapTokenRequiredForSoftwareUpdate bool `plist:"BootstrapTokenRequiredForSoftwareUpdate"` HardwareEncryptionCaps int `plist:"HardwareEncryptionCaps"` PasscodePresent bool `plist:"PasscodePresent"` PasscodeCompliant bool `plist:"PasscodeCompliant"` PasscodeCompliantWithProfiles bool `plist:"PasscodeCompliantWithProfiles"` PasscodeLockGracePeriod int `plist:"PasscodeLockGracePeriod"` PasscodeLockGracePeriodEnforced int `plist:"PasscodeLockGracePeriodEnforced"` FDEEnabled bool `plist:"FDE_Enabled"` FDEHasPersonalRecoveryKey bool `plist:"FDE_HasPersonalRecoveryKey"` FDEHasInstitutionalRecoveryKey bool `plist:"FDE_HasInstitutionalRecoveryKey"` FDEPersonalRecoveryKeyCMS []byte `plist:"FDE_PersonalRecoveryKeyCMS"` FDEPersonalRecoveryKeyDeviceKey string `plist:"FDE_PersonalRecoveryKeyDeviceKey" gorm:"-"` FirewallSettings FirewallSettings `plist:"FirewallSettings" gorm:"foreignKey:DeviceUDID"` SystemIntegrityProtectionEnabled bool `plist:"SystemIntegrityProtectionEnabled"` FirmwarePasswordStatus FirmwarePasswordStatus `plist:"FirmwarePasswordStatus" gorm:"foreignKey:DeviceUDID"` ManagementStatus ManagementStatus `plist:"ManagementStatus" gorm:"foreignKey:DeviceUDID"` RemoteDesktopEnabled bool `plist:"RemoteDesktopEnabled"` SecureBoot SecureBoot `plist:"SecureBoot" gorm:"foreignKey:DeviceUDID"` DeviceUDID string `gorm:"primaryKey"` }
type SecurityInfoData ¶
type SecurityInfoData struct {
SecurityInfo SecurityInfo
}
type SharedInstallApplication ¶
type SharedInstallApplication struct {}
type SharedProfile ¶
type SharedProfile struct {}
SharedProfile (s) are profiles that go on every device.
Click to show internal directories.
Click to hide internal directories.