release

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package release provides shared types for representing releases and their assets across different source providers (GitHub, GitLab, etc.).

Index

Constants

This section is empty.

Variables

View Source
var ErrRelease = errors.New("release")

ErrRelease is returned when a release issue is encountered.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Name   string
	URL    string
	Type   string
	Digest string
}

Asset represents a release asset with its name, download URL, content type, and optional digest.

func (Asset) HasExtension

func (a Asset) HasExtension(extension string) (bool, error)

HasExtension checks if the asset has the given file extension.

func (Asset) Match

func (a Asset) Match(pattern string) (bool, error)

Match checks if the asset name matches the given pattern.

type Assets

type Assets []Asset

Assets represents a collection of release assets.

func (Assets) Checksums

func (as Assets) Checksums(pattern string) checksum.Checksums

Checksums returns all assets that appear to be checksum files. When pattern is non-empty, only checksum-like assets matching the pattern are returned.

func (Assets) FilterByName

func (as Assets) FilterByName(name string) (assets Assets)

FilterByName returns the assets that match the given name. It compares asset names in a case-insensitive manner.

func (Assets) Match

func (as Assets) Match(requirements match.Requirements) (matches match.Results)

Match checks if the assets match the given requirements. It processes each asset to extract platform and extension information.

type Release

type Release struct {
	Name   string
	Tag    string
	Body   string
	Assets Assets
}

Release represents a source release, containing the release name, tag, body, and associated assets.

Jump to

Keyboard shortcuts

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