downloads

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package downloads handles product and add-on download selection and retrieval.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAPINotFound indicates the requested resource was not found.
	ErrAPINotFound = errors.New("resource not found")

	// ErrInvalidInput indicates invalid input was provided.
	ErrInvalidInput = errors.New("invalid input")
)

Functions

func DownloadSelection

func DownloadSelection(ctx context.Context, client *customerapi.Client, cacheManager *cache.Manager, licenseKey string, selection Selection, skipCache bool, progress cache.ProgressCallback) (*cache.Entry, string, error)

DownloadSelection downloads a product based on the selection.

Types

type Selection

type Selection struct {
	Product       string
	VersionID     int
	VersionString string
	Reason        string
}

Selection represents a product/version selection to download.

func ResolveSelections

func ResolveSelections(
	ctx context.Context,
	client versionClient,
	licenseKey string,
	products []string,
	coreVersionID int,
	coreVersionString string,
	overrides map[string]int,
	onSkip func(product string),
) ([]Selection, error)

ResolveSelections resolves versions for core and selected add-ons.

Rules: 1) XenForo core must be explicitly selected by version ID. 2) If core is latest, add-ons use latest. 3) Otherwise add-ons try exact version string, then date fallback, then latest fallback. 4) Optional per-product overrides take precedence.

Jump to

Keyboard shortcuts

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