onedrive

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RingProduction = "Production"
	RingDeferred   = "Deferred"
	RingUpcoming   = "UpcomingDeferred"
	RingRollingOut = "RollingOut"
	RingAppNew     = "AppNew"
	RingInsider    = "Insider"
)

Distribution ring names for Microsoft OneDrive for macOS.

View Source
const (
	ApplicationID = "ONDR18"
	BundleID      = "com.microsoft.OneDrive"
)

OneDrive application identifiers.

Variables

This section is empty.

Functions

This section is empty.

Types

type OneDriveAllRingsResponse

type OneDriveAllRingsResponse struct {
	Rings []*OneDriveRing
}

OneDriveAllRingsResponse aggregates metadata for all OneDrive distribution rings.

type OneDriveRing

type OneDriveRing struct {
	// Ring is the distribution ring name (e.g. "Production", "Deferred").
	Ring string

	// Version is the OneDrive version string for this ring (e.g. "26.062.0402").
	Version string

	// BuildVersion is the full build version if available.
	BuildVersion string

	// DownloadURL is the installer download URL for this ring.
	DownloadURL string

	// ApplicationID is the Microsoft application identifier (always "ONDR18").
	ApplicationID string

	// BundleID is the macOS bundle identifier (always "com.microsoft.OneDrive").
	BundleID string
}

OneDriveRing holds version and download metadata for a single OneDrive distribution ring.

type OneDriveService

type OneDriveService struct {
	// contains filtered or unexported fields
}

OneDriveService fetches Microsoft OneDrive version metadata across all distribution rings.

Data comes from two sources:

  • g.live.com XML manifests (insider and standalone feeds)
  • go.microsoft.com/fwlink redirect URLs (deferred, upcoming, rolling-out, app-new rings)

For fwlink rings, a HEAD request is issued to resolve the final redirect URL, which encodes the version string in its path.

func NewService

func NewService(c client.Client) *OneDriveService

NewService creates a new OneDriveService.

func (*OneDriveService) GetAllRingsV1

func (s *OneDriveService) GetAllRingsV1(ctx context.Context) (*OneDriveAllRingsResponse, error)

GetAllRingsV1 fetches OneDrive version metadata for all distribution rings. It returns a slice of rings ordered: Production, Insider, Deferred, UpcomingDeferred, RollingOut, AppNew.

GET/HEAD against g.live.com manifests and go.microsoft.com fwlink endpoints.

func (*OneDriveService) GetAppNewRingV1

func (s *OneDriveService) GetAppNewRingV1(ctx context.Context) (*OneDriveRing, error)

GetAppNewRingV1 fetches OneDrive metadata for the app-new ring.

HEAD https://go.microsoft.com/fwlink/?linkid=823060

func (*OneDriveService) GetDeferredRingV1

func (s *OneDriveService) GetDeferredRingV1(ctx context.Context) (*OneDriveRing, error)

GetDeferredRingV1 fetches OneDrive metadata for the deferred ring by resolving the fwlink redirect URL.

HEAD https://go.microsoft.com/fwlink/?linkid=861009

func (*OneDriveService) GetInsiderRingV1

func (s *OneDriveService) GetInsiderRingV1(ctx context.Context) (*OneDriveRing, error)

GetInsiderRingV1 fetches OneDrive metadata for the insider ring using the Microsoft insider feed.

GET https://g.live.com/0USSDMC_W5T/MacODSUInsiders

func (*OneDriveService) GetProductionRingV1

func (s *OneDriveService) GetProductionRingV1(ctx context.Context) (*OneDriveRing, error)

GetProductionRingV1 fetches OneDrive metadata for the standalone production ring using the Microsoft standalone product manifest.

GET https://g.live.com/0USSDMC_W5T/StandaloneProductManifest

func (*OneDriveService) GetRollingOutRingV1

func (s *OneDriveService) GetRollingOutRingV1(ctx context.Context) (*OneDriveRing, error)

GetRollingOutRingV1 fetches OneDrive metadata for the rolling-out ring.

HEAD https://go.microsoft.com/fwlink/?linkid=861011

func (*OneDriveService) GetUpcomingDeferredRingV1

func (s *OneDriveService) GetUpcomingDeferredRingV1(ctx context.Context) (*OneDriveRing, error)

GetUpcomingDeferredRingV1 fetches OneDrive metadata for the upcoming deferred ring.

HEAD https://go.microsoft.com/fwlink/?linkid=861010

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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