- func AlpinePackage(ctx context.Context, pkg string, options *AlpinePackageOptions) (latestVersion, downloadUrl string, dependencies []string, err error)
- func AlpinePackages(ctx context.Context, options *AlpinePackagesOptions) (map[string]*AlpinePackageInfo, error)
- func AlpineRelease(ctx context.Context, options *AlpineReleaseOptions) (latestVersion, downloadUrl, downloadChecksum string, err error)
- func GitTag(ctx context.Context, repo string, options *TagOptions) (string, error)
- func GoRelease(ctx context.Context, options *GoOptions) (latestVersion, downloadUrl, downloadChecksum string, err error)
- func ImageDigest(ctx context.Context, name string, options *ImageOptions) (string, error)
- func ImageTag(ctx context.Context, name string, options *ImageTagOptions) (string, error)
- func PostgresRelease(ctx context.Context, options *TagOptions) (latest, url, checksum string, err error)
- type AlpinePackageCache
- type AlpinePackageInfo
- type AlpinePackageOptions
- type AlpinePackagesOptions
- type AlpineReleaseOptions
- type GoOptions
- type ImageOptions
- type ImageTagOptions
- type TagOptions
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.