Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeGithubFilename ¶
NormalizeGithubFilename converts Debian filename to GitHub's normalized form GitHub replaces special chars with dots, keeps alphanumeric, underscore, hyphen, dot
func ParseGitHubDigest ¶
ParseGitHubDigest parses GitHub asset digest into algorithm and hash Returns algorithm (e.g., "sha256") and hex hash, or empty strings if digest is empty/invalid
Types ¶
type Apt ¶
type Apt struct {
// contains filtered or unexported fields
}
Apt handles APT repository downloads
type DistributionMap ¶
type DistributionMap struct {
Feed string // Distribution name in the feed (e.g., "/" for flat repos, "Debian_13", "noble")
Target string // Distribution name in our repository (e.g., "noble", "trixie")
}
DistributionMap represents a mapping from a feed's distribution name to the target repository distribution name. After config resolution, both Feed and Target are always set (identity mapping if no rename specified).
func (DistributionMap) MarshalYAML ¶
func (d DistributionMap) MarshalYAML() (any, error)
MarshalYAML implements custom marshaling for DistributionMap: - If Target is empty or equals Feed: output as string "noble" - If Feed != Target: output as map {"focal": "stable"}
func (*DistributionMap) UnmarshalYAML ¶
func (d *DistributionMap) UnmarshalYAML(node *yaml.Node) error
UnmarshalYAML implements custom unmarshaling for DistributionMap to support both formats: - String: "noble" -> {Feed: "noble", Target: ""} (Target auto-mapped by expansion) - Map: {"focal": "stable"} -> {Feed: "focal", Target: "stable"}
type Feed ¶
type Feed interface {
// Run executes the complete download and verification process
Run(ctx context.Context) error
}
Feed represents any download source type
type FeedOptions ¶
type FeedOptions struct {
// Feed type: github, apt, obs
Type FeedType
// Name identifies the feed source as configured. Format depends on feed type:
// - GitHub: "owner/repo"
// - APT: base URL without scheme (e.g., "deb.debext.org/debian")
// - OBS: project identifier (e.g., "home:dionysius:immich")
Name string
// Derived URLs and paths (calculated during unmarshal)
ProjectURL *url.URL // URL to the project page (e.g., GitHub repo, OBS project)
DownloadURL *url.URL // Base URL for downloads (with https://)
RelativePath string // Relative path for downloads and trusted directory
// GitHub-specific
Releases []ReleaseType // Release types to include
Tags []string // Tag name filters (glob patterns, ! prefix for negation)
NoChanges bool // Skip .changes files and directly download package files (requires dist mapping)
// Common to all feeds
Distributions []DistributionMap // Distribution mappings from feed to target repository
// Package source filtering - which packages to include
FromSources []string // Source name patterns (glob, ! for negation), empty = include all
// Package name filtering - which packages to include
Packages []string // Package name patterns (glob, ! for negation), empty = include all
}
FeedOptions contains fully-resolved configuration for a feed source. All values are already inherited/merged from repository-level config.
func ExpandAptFeedOptions ¶ added in v0.0.7
func ExpandAptFeedOptions(options *FeedOptions) []*FeedOptions
ExpandAptFeedOptions expands a single APT FeedOptions with prefix mappings into multiple FeedOptions, one per distribution.
func ExpandOBSFeedOptions ¶ added in v0.0.7
func ExpandOBSFeedOptions(options *FeedOptions) []*FeedOptions
ExpandOBSFeedOptions expands an OBS FeedOptions into flat APT FeedOptions, one per distribution. OBS distributions are converted to APT prefix notation where each OBS dist becomes a prefix with a flat repo (/).
func (FeedOptions) MarshalYAML ¶
func (f FeedOptions) MarshalYAML() (any, error)
MarshalYAML implements custom marshaling for FeedOptions to output feed type fields implicitly.
func (*FeedOptions) UnmarshalYAML ¶
func (f *FeedOptions) UnmarshalYAML(node *yaml.Node) (err error)
UnmarshalYAML implements custom unmarshaling for FeedOptions to handle feed type fields implicitly. Detects feed type from github/apt/obs fields and sets Type and Location accordingly.
type FeedType ¶
type FeedType string
FeedType represents the type of feed source
type Github ¶
type Github struct {
// contains filtered or unexported fields
}
Github handles github release downloads
type ReleaseType ¶
type ReleaseType string
ReleaseType represents a GitHub release type
const ( ReleaseTypeRelease ReleaseType = "release" // Normal release (not draft, not prerelease) ReleaseTypePrerelease ReleaseType = "pre-release" // Pre-release ReleaseTypeDraft ReleaseType = "draft" // Draft release )
Release type constants for GitHub feeds