modulepackage
0.0.0-20180512233915-03ff93db459f
Repository: https://github.com/micromdm/dep.git
Documentation: pkg.go.dev
# README
dep is a client library for working with Apple's Device Enrollment Program
See godoc for detailed usage.
Usage
Configure and create an http client passing the Oauth credentials from the server token.
config := dep.Config{
ConsumerKey: "CK_3a419c0b",
ConsumerSecret: "CS_3fb23281",
AccessToken: "AT_O8473841",
AccessSecret: "AS_9d141598",
}
client, err := dep.NewClient(config)
if err != nil {
// handle err
}
Use the new DEP client:
account, err := client.Account()
if err != nil {
// handle err
}
Example
In the examples folder, there's an example that you can try running against the depsim
binary.
# Packages
No description provided by the author
# Functions
Cursor is an optional argument that can be added to FetchDevices.
Debug will preint responses from DEP to stdout.
Limit is an optional argument that can be passed to FetchDevices and SyncDevices.
NewClient creates a new HTTP client for communicating with DEP.
ServerURL allows the user to provide a URL for DEP server other than the default useful for testing with depsim.
# Structs
Account is a DEP account.
Config is a configuration struct for DEP.
Device is a DEP device.
DeviceDetailsResponse is a response for a DeviceDetails request.
DeviceResponse is a DEP FetchDevices response.
Profile is a DEP setup profile.
ProfileResponse is the response body for Define Profile.
# Interfaces
AccountService communicates with the DEP Account Details endpoint
account, err := client.Account()
*/.
Client interacts with DEP.
DeviceService allows fetching and syncing devices, as well as requesting device details
Use (Cursor() and Limit() as optional arguments for Fetch Devices, example:
fetchResponse, err := client.FetchDevices(dep.Limit(100))
if err != nil {
// handle err
}
fmt.Println(fetchResponse.Devices)
*/.
ProfileService allows Defining, Assigning and Fetching profiles from DEP.
# Type aliases
DeviceRequestOption is an optional parameter for the DeviceService API.