testdownloader

package
v0.0.0-...-69eaee5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

type Downloader struct {
	URL        string
	Plugins    []*api.Plugin
	FileServer *httptest.Server
	MuxServer  *httptest.Server
}

Downloader wrapps the official Jenkins downloads URL around a PluginsFetcher

func NewDownloader

func NewDownloader(dir string, plugins []*api.Plugin) *Downloader

NewDownloader will return a new fetcher

func (*Downloader) Download

func (d *Downloader) Download(ctx context.Context, p *api.Plugin, w io.Writer) error

Download will fetch a plugin from the official Jenkins download page and will write it to the provided writer.

func (*Downloader) GetDownloadURL

func (d *Downloader) GetDownloadURL(p *api.Plugin) string

GetDownloadURL prints the URL for the given plugin

Jump to

Keyboard shortcuts

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