team

package
v0.0.0-...-2c15d23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDevice

func AddDevice() error

AddDevice reports the device to the team.

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 LinkingResponse struct {
	Team string `json:"team"`
	Auth string `json:"auth"`
}

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"`
}

func NowReport

func NowReport() Report

type TicketResponse

type TicketResponse struct {
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL