sources

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadHash

func DownloadHash(url string) (string, error)

DownloadHash downloads the given URL and parses the first hash out of it, assuming it's formatted in line with the output of sha256sum. Hashes are assumed to be hexadecimal and an error will be returned if this is not the case.

func DownloadJson

func DownloadJson(url string, i interface{}) error

DownloadJson requests the given url and then attempts to unmarshal the body as JSON into the provided struct.

func DownloadYaml

func DownloadYaml(url string, i interface{}) error

DownloadYaml requests the given url and then attempts to unmarshal the body as YAML into the provided struct.

func FindInHtml

func FindInHtml(url string, selector string) ([]string, error)

FindInHtml downloads the HTML page at the given URL and runs the specified CSS selector over it to find nodes. The textual content of those nodes is returned.

func LatestAlpinePackages

func LatestAlpinePackages(names ...string) (map[string]string, error)

LatestAlpinePackages returns a map of packages to their latest version. The result will include all the provided package names, plus all of their direct and transitive dependencies.

func LatestAlpineRelease

func LatestAlpineRelease() (latest string, url string, checksum string)

func LatestDigest

func LatestDigest(ref string) (string, string, error)

LatestDigest finds the latest digest for the given image reference. If either the username or password is blank, falls back to using the default docker keychain.

func LatestGitHubTag

func LatestGitHubTag(repo string, prefix string) (string, error)

LatestGitHubTag uses the GitHub API to find the tag for the latest stable release.

func LatestGitTag added in v1.1.0

func LatestGitTag(repo string, prefix string) (string, error)

LatestGitTag queries a remote git repository to find the latest semver tag, optionally stripping the given prefix from tags before processing.

func LatestGolangRelease

func LatestGolangRelease() (latest string, url string, checksum string)

func LatestPostgresRelease

func LatestPostgresRelease(majorVersion string) func() (latest string, url string, checksum string)

func RegexURLContent added in v1.5.0

func RegexURLContent(url string, regex string) (string, error)

func Registry

func Registry() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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