Documentation ¶
Index ¶
- func DownloadHash(url string) (string, error)
- func DownloadJson(url string, i interface{}) error
- func DownloadYaml(url string, i interface{}) error
- func FindInHtml(url string, selector string) ([]string, error)
- func LatestAlpinePackages(names ...string) (map[string]string, error)
- func LatestAlpineRelease() (latest string, url string, checksum string)
- func LatestDigest(ref string) (string, string, error)
- func LatestGitHubTag(repo string, prefix string) (string, error)
- func LatestGitTag(repo string, prefix string) (string, error)
- func LatestGolangRelease() (latest string, url string, checksum string)
- func LatestPostgresRelease(majorVersion string) func() (latest string, url string, checksum string)
- func Registry() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadHash ¶
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 ¶
DownloadJson requests the given url and then attempts to unmarshal the body as JSON into the provided struct.
func DownloadYaml ¶
DownloadYaml requests the given url and then attempts to unmarshal the body as YAML into the provided struct.
func FindInHtml ¶
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 ¶
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 LatestDigest ¶
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 ¶
LatestGitHubTag uses the GitHub API to find the tag for the latest stable release.
func LatestGitTag ¶ added in v1.1.0
LatestGitTag queries a remote git repository to find the latest semver tag, optionally stripping the given prefix from tags before processing.
func LatestGolangRelease ¶
func LatestPostgresRelease ¶
Types ¶
This section is empty.