imagefetcher

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package imagefetcher provides helping wrappers around a versionsapi fetcher.

It also enables local image overrides and download of raw images.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Downloader

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

Downloader downloads raw images.

func NewDownloader

func NewDownloader() *Downloader

NewDownloader creates a new Downloader.

func (*Downloader) Download

func (d *Downloader) Download(ctx context.Context, errWriter io.Writer, showBar bool, source, imageName string) (string, error)

Download downloads the raw image from source.

type Fetcher

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

Fetcher fetches image references using a lookup table.

func New

func New() *Fetcher

New returns a new image fetcher.

func (*Fetcher) FetchReference

func (f *Fetcher) FetchReference(ctx context.Context,
	provider cloudprovider.Provider, attestationVariant variant.Variant,
	image, region string, useMarketplaceImage bool,
) (string, error)

FetchReference fetches the image reference for a given image version uid, CSP and image variant.

Jump to

Keyboard shortcuts

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