Documentation
¶
Index ¶
Constants ¶
const ( BundleIDCompanyPortal = "com.microsoft.CompanyPortalMac" BundleIDExcel = "com.microsoft.Excel" BundleIDOneDrive = "com.microsoft.OneDrive" BundleIDOutlook = "com.microsoft.Outlook" BundleIDPowerPoint = "com.microsoft.Powerpoint" BundleIDVSCode = "com.microsoft.VSCode" BundleIDWord = "com.microsoft.Word" BundleIDOffice365Suite = "com.microsoft.office.suite" BundleIDOneNote = "com.microsoft.onenote.mac" BundleIDWindowsApp = "com.microsoft.rdc.macos" BundleIDTeams = "com.microsoft.teams2" BundleIDDefender = "com.microsoft.wdav" BundleIDAutoUpdate = "com.microsoft.autoupdate2" BundleIDEdge = "com.microsoft.edgemac" BundleIDIntuneAgent = "com.microsoft.intuneMDMAgent" BundleIDM365Copilot = "com.microsoft.m365copilot" )
Common application bundle IDs
const ( AppNameCompanyPortal = "Company Portal" AppNameExcel = "Microsoft Excel" AppNameOneDrive = "Microsoft OneDrive" AppNameOutlook = "Microsoft Outlook" AppNamePowerPoint = "Microsoft PowerPoint" AppNameVSCode = "Visual Studio Code" AppNameWord = "Microsoft Word" AppNameOffice365 = "Office 365 for Mac" AppNameOneNote = "Microsoft OneNote" AppNameWindowsApp = "Windows App" AppNameTeams = "Microsoft Teams" AppNameDefender = "Defender for Mac" AppNameAutoUpdate = "Microsoft AutoUpdate" AppNameEdge = "Microsoft Edge" AppNameIntuneAgent = "Intune Agent" AppNameM365Copilot = "M365 Copilot" )
Common application names
const (
EndpointLatest = "/latest"
)
API Endpoints
const (
TypeApplication = "application"
)
Application type constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
AppPath string `json:"app_path"`
BundleID string `json:"bundle_id"`
ComponentCount int `json:"component_count,omitempty"`
Components []Component `json:"components,omitempty"`
Detected string `json:"detected"`
DirectURL string `json:"direct_url"`
DownloadURL string `json:"download_url"`
ETag string `json:"etag"`
InstallKB *int `json:"install_kb,omitempty"`
LastModified string `json:"last_modified"`
Name string `json:"name"`
NumFiles *int `json:"num_files,omitempty"`
PackageID string `json:"package_identifier"`
SHA256 string `json:"sha256"`
SizeBytes int64 `json:"size_bytes"`
SizeMB float64 `json:"size_mb"`
Type string `json:"type"`
Version string `json:"version"`
}
App represents a Microsoft application for Mac
func (*App) ParseDetectedTime ¶
ParseDetectedTime parses the detected timestamp
type AppsResponse ¶
AppsResponse represents the complete API response
func (*AppsResponse) ParseGeneratedTime ¶
func (r *AppsResponse) ParseGeneratedTime() (time.Time, error)
ParseGeneratedTime parses the generated timestamp from the response
type AppsService ¶
type AppsService struct {
// contains filtered or unexported fields
}
AppsService handles communication with the apps related methods of the Microsoft Mac Apps API
func NewService ¶
func NewService(client interfaces.HTTPClient) *AppsService
NewService creates a new apps service
func (*AppsService) GetAppByBundleID ¶
GetAppByBundleID finds an application by its bundle ID
func (*AppsService) GetAppByName ¶
GetAppByName finds an application by its name
func (*AppsService) GetLatestApps ¶
func (s *AppsService) GetLatestApps(ctx context.Context) (*AppsResponse, error)
GetLatestApps retrieves the latest Microsoft Mac application versions URL: GET https://appledevicepolicy.tools/api/latest
type AppsServiceInterface ¶
type AppsServiceInterface interface {
// GetLatestApps retrieves the latest Microsoft Mac application versions
//
// API docs: https://appledevicepolicy.tools/microsoft-apps
GetLatestApps(ctx context.Context) (*AppsResponse, error)
// GetAppByBundleID finds an application by its bundle ID
GetAppByBundleID(ctx context.Context, bundleID string) (*App, error)
// GetAppByName finds an application by its name
GetAppByName(ctx context.Context, name string) (*App, error)
}
AppsServiceInterface defines the interface for apps operations