Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChecksumDownloader ¶
type ChecksumDownloaderImpl ¶
type ChecksumDownloaderImpl struct {
// contains filtered or unexported fields
}
func NewChecksumDownloader ¶
func NewChecksumDownloader(gh GitHub, rt *runtime.Runtime, httpDownloader HTTPDownloader) *ChecksumDownloaderImpl
func (*ChecksumDownloaderImpl) DownloadChecksum ¶
type DownloadedFile ¶ added in v2.7.1
type DownloadedFile struct {
// contains filtered or unexported fields
}
func NewDownloadedFile ¶ added in v2.7.1
func NewDownloadedFile(fs afero.Fs, body io.ReadCloser, pb *progressbar.ProgressBar) *DownloadedFile
func (*DownloadedFile) Close ¶ added in v2.7.1
func (f *DownloadedFile) Close() error
func (*DownloadedFile) Path ¶ added in v2.11.0
func (f *DownloadedFile) Path() (string, error)
func (*DownloadedFile) Read ¶ added in v2.7.1
func (f *DownloadedFile) Read() (io.ReadCloser, error)
func (*DownloadedFile) ReadLast ¶ added in v2.7.1
func (f *DownloadedFile) ReadLast() (io.ReadCloser, error)
func (*DownloadedFile) Remove ¶ added in v2.7.1
func (f *DownloadedFile) Remove() error
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(gh GitHub, httpDownloader HTTPDownloader) *Downloader
func (*Downloader) ReadCloser ¶ added in v2.11.0
func (dl *Downloader) ReadCloser(ctx context.Context, logE *logrus.Entry, file *File) (io.ReadCloser, int64, error)
type File ¶
type File struct { Type string RepoOwner string RepoName string Version string Asset string URL string Path string Private bool }
func ConvertPackageToFile ¶
type GitHub ¶
type GitHub interface { DownloadContents(ctx context.Context, logE *logrus.Entry, owner, repo, filepath string, opts *github.RepositoryContentGetOptions) (io.ReadCloser, *github.Response, error) GetReleaseByTag(ctx context.Context, logE *logrus.Entry, owner, repoName, version string) (*github.RepositoryRelease, *github.Response, error) DownloadReleaseAsset(ctx context.Context, logE *logrus.Entry, owner, repoName string, assetID int64, httpClient *http.Client) (io.ReadCloser, string, error) GetArchiveLink(ctx context.Context, logE *logrus.Entry, owner, repo string, archiveformat github.ArchiveFormat, opts *github.RepositoryContentGetOptions, maxRedirects int) (*url.URL, *github.Response, error) }
type GitHubContentAPI ¶
type GitHubContentFileDownloader ¶
type GitHubContentFileDownloader struct {
// contains filtered or unexported fields
}
func NewGitHubContentFileDownloader ¶
func NewGitHubContentFileDownloader(gh GitHubContentAPI, httpDL HTTPDownloader) *GitHubContentFileDownloader
func (*GitHubContentFileDownloader) DownloadGitHubContentFile ¶
func (dl *GitHubContentFileDownloader) DownloadGitHubContentFile(ctx context.Context, logE *logrus.Entry, param *domain.GitHubContentFileParam) (*domain.GitHubContentFile, error)
type GitHubReleaseAPI ¶
type GitHubReleaseAPI interface { GetReleaseByTag(ctx context.Context, logE *logrus.Entry, owner, repoName, version string) (*github.RepositoryRelease, *github.Response, error) DownloadReleaseAsset(ctx context.Context, logE *logrus.Entry, owner, repoName string, assetID int64, httpClient *http.Client) (io.ReadCloser, string, error) }
type GitHubReleaseDownloader ¶
type GitHubReleaseDownloader struct {
// contains filtered or unexported fields
}
func NewGitHubReleaseDownloader ¶
func NewGitHubReleaseDownloader(gh GitHubReleaseAPI, httpDL HTTPDownloader) *GitHubReleaseDownloader
func (*GitHubReleaseDownloader) DownloadGitHubRelease ¶
func (dl *GitHubReleaseDownloader) DownloadGitHubRelease(ctx context.Context, logE *logrus.Entry, param *domain.DownloadGitHubReleaseParam) (io.ReadCloser, int64, error)
type HTTPDownloader ¶
type HTTPDownloader interface {
Download(ctx context.Context, u string) (io.ReadCloser, int64, error)
}
func NewHTTPDownloader ¶
func NewHTTPDownloader(httpClient *http.Client) HTTPDownloader
type MockChecksumDownloader ¶
func (*MockChecksumDownloader) DownloadChecksum ¶
Click to show internal directories.
Click to hide internal directories.