Documentation
¶
Index ¶
- Constants
- type EdgeAllChannelsResponse
- type EdgeArtifact
- type EdgeChannelResponse
- type EdgeRelease
- type EdgeService
- func (s *EdgeService) GetAllChannelsV1(ctx context.Context) (*EdgeAllChannelsResponse, error)
- func (s *EdgeService) GetBetaV1(ctx context.Context) (*EdgeChannelResponse, error)
- func (s *EdgeService) GetCanaryV1(ctx context.Context) (*EdgeChannelResponse, error)
- func (s *EdgeService) GetDevV1(ctx context.Context) (*EdgeChannelResponse, error)
- func (s *EdgeService) GetStableV1(ctx context.Context) (*EdgeChannelResponse, error)
Constants ¶
const ( ChannelStable = "stable" ChannelBeta = "beta" ChannelDev = "dev" ChannelCanary = "canary" )
Edge channel names as used in the Microsoft Edge update API.
const PlatformMacOS = "MacOS"
Platform identifier for macOS in the Edge update API response.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeAllChannelsResponse ¶
type EdgeAllChannelsResponse struct {
Stable *EdgeRelease
Beta *EdgeRelease
Dev *EdgeRelease
Canary *EdgeRelease
}
EdgeAllChannelsResponse aggregates the latest macOS release for each Edge channel.
type EdgeArtifact ¶
type EdgeArtifact struct {
// ArtifactName identifies the package type (e.g. "pkg", "dmg").
ArtifactName string
// Location is the download URL for the artifact.
Location string
// SizeInBytes is the artifact file size.
SizeInBytes int64
// HashSHA256 is the SHA-256 checksum of the artifact.
HashSHA256 string
}
EdgeArtifact describes a single downloadable artifact within an Edge release.
type EdgeChannelResponse ¶
type EdgeChannelResponse struct {
Channel string
Release *EdgeRelease
}
EdgeChannelResponse holds the latest macOS release for a single Edge channel.
type EdgeRelease ¶
type EdgeRelease struct {
// Channel is the distribution channel (stable, beta, dev, canary).
Channel string
// Version is the full Edge version string (e.g. "147.0.3912.72").
Version string
// PublishedTime is the ISO 8601 timestamp when this version was published.
PublishedTime string
// Artifacts contains the downloadable package entries for macOS.
Artifacts []EdgeArtifact
}
EdgeRelease represents the latest Edge release for a given channel on macOS.
type EdgeService ¶
type EdgeService struct {
// contains filtered or unexported fields
}
EdgeService fetches Microsoft Edge release metadata for all distribution channels.
Data is sourced from:
https://edgeupdates.microsoft.com/api/products/{channel}
Each endpoint returns a JSON array of product release objects. This service filters for macOS (Platform == "MacOS") and returns the latest release per channel.
func NewService ¶
func NewService(c client.Client) *EdgeService
NewService creates a new EdgeService.
func (*EdgeService) GetAllChannelsV1 ¶
func (s *EdgeService) GetAllChannelsV1(ctx context.Context) (*EdgeAllChannelsResponse, error)
GetAllChannelsV1 fetches the latest macOS Edge release for all four channels (stable, beta, dev, canary) and returns them as an aggregated response.
GET https://edgeupdates.microsoft.com/api/products/{channel}
func (*EdgeService) GetBetaV1 ¶
func (s *EdgeService) GetBetaV1(ctx context.Context) (*EdgeChannelResponse, error)
GetBetaV1 fetches the latest macOS Edge beta release.
func (*EdgeService) GetCanaryV1 ¶
func (s *EdgeService) GetCanaryV1(ctx context.Context) (*EdgeChannelResponse, error)
GetCanaryV1 fetches the latest macOS Edge canary release.
func (*EdgeService) GetDevV1 ¶
func (s *EdgeService) GetDevV1(ctx context.Context) (*EdgeChannelResponse, error)
GetDevV1 fetches the latest macOS Edge dev release.
func (*EdgeService) GetStableV1 ¶
func (s *EdgeService) GetStableV1(ctx context.Context) (*EdgeChannelResponse, error)
GetStableV1 fetches the latest macOS Edge stable release.