gdmf

package
v0.4.16 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gdmf reads Apple's public software-update catalog.

Index

Constants

View Source
const (
	// DefaultURL is Apple's public software-update catalog endpoint.
	DefaultURL = "https://gdmf.apple.com/v2/pmv"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	AssetSets                    map[string][]Release `json:"AssetSets"`
	PublicAssetSets              map[string][]Release `json:"PublicAssetSets"`
	PublicRapidSecurityResponses map[string][]Release `json:"PublicRapidSecurityResponses"`
}

Catalog is the top-level GDMF response split into managed, public, and RSR sets.

func (*Catalog) Entries

func (c *Catalog) Entries(now time.Time) []Entry

Entries flattens all catalog sets and evaluates expiration relative to now.

type Client

type Client struct {
	URL       string
	HTTP      *http.Client
	CachePath string
	CacheTTL  time.Duration
}

Client fetches and conditionally caches Apple's GDMF catalog.

func New

func New(url string) *Client

New returns a bounded GDMF client. The default endpoint enables persistent caching; an override URL is intentionally uncached unless the caller supplies CachePath.

func (*Client) Fetch

func (c *Client) Fetch() (*Catalog, error)

Fetch returns the catalog, using a fresh cache or ETag revalidation when configured.

type Entry

type Entry struct {
	Platform         string   `json:"platform"`
	ProductVersion   string   `json:"productVersion"`
	Build            string   `json:"build"`
	PostingDate      string   `json:"postingDate"`
	ExpirationDate   string   `json:"expirationDate,omitempty"`
	SupportedDevices []string `json:"supportedDevices,omitempty"`
	Catalog          string   `json:"catalog"` // managed|public|rsr
	Expired          bool     `json:"expired"`
}

Entry is the stable, flattened representation exposed by abctl.

type Release

type Release struct {
	ProductVersion   string   `json:"ProductVersion"`
	Build            string   `json:"Build"`
	PostingDate      string   `json:"PostingDate"`
	ExpirationDate   string   `json:"ExpirationDate,omitempty"`
	SupportedDevices []string `json:"SupportedDevices,omitempty"`
}

Release is one Apple software release in a GDMF asset set.

Jump to

Keyboard shortcuts

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