pkg.go.dev

This section is empty.

This section is empty.

AlpinePackage retrieves the latest version of the given package, the url it can be downloaded from, and the names of its declared dependencies. It does not return a checksum as the APK files themselves can be verified using their signatures.

Knowing the latest version of a package involves downloading and parsing the APKINDEX file, which is a moderately expensive operation. If you are calling this func multiple times, you should populate the Cache option with a cache that will maintain state. See NewInMemoryAlpinePackageCache for a simple in-memory cache that will suffice for most purposes.

If calling this func with multiple different options (such as repository, branch or architecture), care should be given to ensure that a unique cache is provided for each combination.

pkg can be a package name, or any token that is provided by a package, e.g. "so:libssl.so.3" or "cmd:busybox".

AlpinePackages retrieves the latest list of packages available from an Alpine Linux repository.

AlpineRelease finds the latest release of Alpine Linux, returning the version, download URL and file checksum.

GitTag lists the tags available in the specified repository, and returns the latest semver tag.

The repository must be specified as an HTTP/HTTPS url.

GoRelease finds the latest release of Go, returning the version, download URL and file checksum.

ImageDigest queries an image registry and returns the latest digest of an image with the given name.

ImageTag queries an image registry for the available tags for the given image, and returns the latest semver tag.

AlpinePackageCache facilitates storing information about available Alpine packages between calls of AlpinePackage.

func NewInMemoryAlpinePackageCache() AlpinePackageCache

NewInMemoryAlpinePackageCache creates a new AlpinePackageCache that simply stores the package data in memory.

type AlpinePackageOptions struct {
	AlpinePackagesOptions



	Cache AlpinePackageCache
}

AlpinePackageOptions defines options for calls to AlpinePackage

AlpinePackagesOptions defines options for calls to AlpinePackages

AlpineReleaseOptions defines options for calls to AlpineRelease

GoOptions defines options for calling GoRelease.

ImageOptions defines options for image-related functions.

type ImageTagOptions struct {
	ImageOptions
	TagOptions
}

ImageTagOptions defines the options for calls to ImageTag.

type TagOptions struct {

	IgnoreDates bool

	IgnoreErrors bool

	IgnorePreRelease bool

	PreReleases []string

	TrimPrefixes []string

	TrimSuffixes []string

	MajorVersionMax int
}

TagOptions defines options for functions that need to deal with semver tags.

Read the original on pkg.go.dev ↗