releases

package
v1.0.3040-70ad322 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package releases is a helper to determine which binaries to download for end to end tests.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type Releases

type Releases struct {
	// contains filtered or unexported fields
}

Releases helps find the latest release and download URL for artifacts using the execution release structure.

func New

func New(baseURL string) *Releases

func (*Releases) ResolveURL

func (d *Releases) ResolveURL(ctx context.Context, rq Requirements) (string, error)

ResolveURL gets the raw download URL for a release, based on the requirements (version, OS, arch)

func (*Releases) ResolveURLs

func (d *Releases) ResolveURLs(ctx context.Context, rq Requirements) (map[string]string, error)

ResolveURLs gets the raw download URLs for all binaries of a release, based on the requirements (version, OS, arch)

func (*Releases) Version

func (d *Releases) Version(ctx context.Context) (string, error)

Version gets the latest released version of an artifact.

type Requirements

type Requirements struct {
	Version string `json:"version"`
	OS      string `json:"os"`
	Arch    string `json:"arch"`
}

Jump to

Keyboard shortcuts

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