github

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const DownloadTimeout = 300

Variables

This section is empty.

Functions

func NewGitHubClient

func NewGitHubClient(ctx context.Context, githubOpenBmcToken string) *github.Client

NewGitHubClient creates a new github.Client.

func NewGitHubDownloader

func NewGitHubDownloader(logger *logrus.Logger, client *github.Client) vendors.Downloader

NewGitHubDownloader creates a new vendors.Downloader that can download content from GitHub.

Types

type Downloader

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

func (*Downloader) Download

func (d *Downloader) Download(
	ctx context.Context,
	downloadDir string,
	firmware *serverservice.ComponentFirmwareVersion,
) (string, error)

Download will download the file for the given firmware from GitHub into the downloadDir, and returns the full path to the downloaded file.

Jump to

Keyboard shortcuts

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