Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LinkAndWaitForTicket ¶
func LinkAndWaitForTicket() error
LinkAndWaitForTicket initiates the device linking process and waits for the device to be linked to a team. It performs the following steps: 1. Creates a new linking device. 2. Sends a request to enroll the device and retrieves the enrollment URL. 3. Logs the enrollment URL for the user to visit. 4. Starts a goroutine that periodically checks the link status until the device is linked to a team. 5. Updates the configuration with the team ID and authentication token once the device is linked. 6. Attempts to open the enrollment URL in the default web browser.
Returns an error if any step in the process fails.
func ReportToTeam ¶
func ReportToTeam() error
ReportAndSave generates a report and saves it to the configuration file.
Types ¶
type LinkingResponse ¶
type Report ¶
type Report struct { PassedCount int `json:"passedCount"` FailedCount int `json:"failedCount"` DisabledCount int `json:"disabledCount"` Device shared.ReportingDevice `json:"device"` Version string `json:"version"` LastCheck string `json:"lastCheck"` SignificantChange string `json:"significantChange"` State map[string]string `json:"state"` }
type TicketResponse ¶
type TicketResponse struct {
URL string `json:"url"`
}