Documentation
¶
Index ¶
- Constants
- type Account
- type ActivationLockRequest
- type ActivationLockResponse
- type Client
- func (c *Client) Account() (*Account, error)
- func (c *Client) ActivationLock(alr ActivationLockRequest) (*ActivationLockResponse, error)
- func (c *Client) AssignProfile(uuid string, serials ...string) (*ProfileResponse, error)
- func (c *Client) DefineProfile(request *Profile) (*ProfileResponse, error)
- func (c *Client) DeviceDetails(serials ...string) (*DeviceDetailsResponse, error)
- func (c *Client) FetchDevices(opts ...DeviceRequestOption) (*DeviceResponse, error)
- func (c *Client) FetchProfile(uuid string) (*Profile, error)
- func (c *Client) RemoveProfile(serials ...string) (map[string]string, error)
- func (c *Client) SyncDevices(cursor string, opts ...DeviceRequestOption) (*DeviceResponse, error)
- type Device
- type DeviceDetailsResponse
- type DeviceRequestOption
- type DeviceResponse
- type HTTPClient
- type HTTPError
- type LimitDict
- type OAuthParameters
- type Option
- type Profile
- type ProfileResponse
- type URL
Constants ¶
View Source
const ( XServerProtocolVersionHeader = "X-Server-Protocol-Version" XServerProtocolVersion = "3" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ServerName string `json:"server_name"` ServerUUID string `json:"server_uuid"` AdminID string `json:"admin_id"` FacilitatorID string `json:"facilitator_id,omitempty"` //deprecated OrgName string `json:"org_name"` OrgEmail string `json:"org_email"` OrgPhone string `json:"org_phone"` OrgAddress string `json:"org_address"` OrgID string `json:"org_id"` OrgIDHash string `json:"org_id_hash"` URLs []URL `json:"urls"` OrgType string `json:"org_type"` OrgVersion string `json:"org_version"` }
type ActivationLockRequest ¶
type ActivationLockRequest struct { Device string `json:"device"` // If the escrow key is not provided, the device will be locked to the person who created the MDM server in the portal. // https://developer.apple.com/documentation/devicemanagement/device_assignment/activation_lock_a_device/creating_and_using_bypass_codes // The EscrowKey is a hex-encoded PBKDF2 derivation of the bypass code. See activationlock.BypassCode. EscrowKey string `json:"escrow_key"` LostMessage string `json:"lost_message"` }
type ActivationLockResponse ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(p OAuthParameters, opts ...Option) *Client
func (*Client) ActivationLock ¶
func (c *Client) ActivationLock(alr ActivationLockRequest) (*ActivationLockResponse, error)
func (*Client) AssignProfile ¶
func (c *Client) AssignProfile(uuid string, serials ...string) (*ProfileResponse, error)
func (*Client) DefineProfile ¶
func (c *Client) DefineProfile(request *Profile) (*ProfileResponse, error)
func (*Client) DeviceDetails ¶
func (c *Client) DeviceDetails(serials ...string) (*DeviceDetailsResponse, error)
func (*Client) FetchDevices ¶
func (c *Client) FetchDevices(opts ...DeviceRequestOption) (*DeviceResponse, error)
func (*Client) RemoveProfile ¶
func (*Client) SyncDevices ¶
func (c *Client) SyncDevices(cursor string, opts ...DeviceRequestOption) (*DeviceResponse, error)
type Device ¶
type Device struct { SerialNumber string `json:"serial_number"` Model string `json:"model"` Description string `json:"description"` Color string `json:"color"` AssetTag string `json:"asset_tag,omitempty"` ProfileStatus string `json:"profile_status"` ProfileUUID string `json:"profile_uuid,omitempty"` ProfileAssignTime time.Time `json:"profile_assign_time,omitempty"` ProfilePushTime time.Time `json:"profile_push_time,omitempty"` DeviceAssignedDate time.Time `json:"device_assigned_date,omitempty"` DeviceAssignedBy string `json:"device_assigned_by,omitempty"` OS string `json:"os,omitempty"` DeviceFamily string `json:"device_family,omitempty"` // sync fields OpType string `json:"op_type,omitempty"` OpDate time.Time `json:"op_date,omitempty"` // details fields ResponseStatus string `json:"response_status,omitempty"` }
type DeviceDetailsResponse ¶
type DeviceRequestOption ¶
type DeviceRequestOption func(*deviceRequestOpts) error
DeviceRequestOption is an optional parameter for the DeviceService API. The option can be used to set Cursor or Limit options for the request.
func Cursor ¶
func Cursor(cursor string) DeviceRequestOption
Cursor is an optional argument that can be added to FetchDevices
func Limit ¶
func Limit(limit int) DeviceRequestOption
Limit is an optional argument that can be passed to FetchDevices and SyncDevices
type DeviceResponse ¶
type HTTPError ¶
func NewHTTPError ¶
type OAuthParameters ¶
type Option ¶
type Option func(*Client)
func WithHTTPClient ¶
func WithHTTPClient(client HTTPClient) Option
func WithServerURL ¶
type Profile ¶
type Profile struct { ProfileName string `json:"profile_name"` ProfileUUID string `json:"profile_uuid,omitempty"` URL string `json:"url"` AllowPairing bool `json:"allow_pairing,omitempty"` IsSupervised bool `json:"is_supervised,omitempty"` IsMultiUser bool `json:"is_multi_user,omitempty"` IsMandatory bool `json:"is_mandatory,omitempty"` AwaitDeviceConfigured bool `json:"await_device_configured,omitempty"` IsMDMRemovable bool `json:"is_mdm_removable"` SupportPhoneNumber string `json:"support_phone_number,omitempty"` AutoAdvanceSetup bool `json:"auto_advance_setup,omitempty"` SupportEmailAddress string `json:"support_email_address,omitempty"` OrgMagic string `json:"org_magic"` AnchorCerts []string `json:"anchor_certs,omitempty"` SupervisingHostCerts []string `json:"supervising_host_certs,omitempty"` SkipSetupItems []string `json:"skip_setup_items,omitempty"` Department string `json:"department,omitempty"` Devices []string `json:"devices"` Language string `json:"language,omitempty"` Region string `json:"region,omitempty"` ConfigurationWebURL string `json:"configuration_web_url,omitempty"` }
type ProfileResponse ¶
Click to show internal directories.
Click to hide internal directories.