Documentation ¶
Index ¶
- type ChecksumDownloader
- type ChecksumDownloaderImpl
- type ClientAPI
- type DownloadedFile
- func (file *DownloadedFile) Close() error
- func (file *DownloadedFile) GetPath() (string, error)
- func (file *DownloadedFile) Read() (io.ReadCloser, error)
- func (file *DownloadedFile) ReadLast() (io.ReadCloser, error)
- func (file *DownloadedFile) Remove() error
- func (file *DownloadedFile) Wrap(w io.Writer) io.Writer
- type Downloader
- type File
- type GitHubContentAPI
- type GitHubContentFileDownloader
- type GitHubReleaseAPI
- type GitHubReleaseDownloader
- type HTTPDownloader
- type Mock
- type MockChecksumDownloader
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.RepositoriesService, rt *runtime.Runtime, httpDownloader HTTPDownloader) *ChecksumDownloaderImpl
func (*ChecksumDownloaderImpl) DownloadChecksum ¶
type DownloadedFile ¶
type DownloadedFile struct {
// contains filtered or unexported fields
}
func NewDownloadedFile ¶
func NewDownloadedFile(fs afero.Fs, body io.ReadCloser, pb *progressbar.ProgressBar) *DownloadedFile
func (*DownloadedFile) Close ¶
func (file *DownloadedFile) Close() error
func (*DownloadedFile) GetPath ¶
func (file *DownloadedFile) GetPath() (string, error)
func (*DownloadedFile) Read ¶
func (file *DownloadedFile) Read() (io.ReadCloser, error)
func (*DownloadedFile) ReadLast ¶
func (file *DownloadedFile) ReadLast() (io.ReadCloser, error)
func (*DownloadedFile) Remove ¶
func (file *DownloadedFile) Remove() error
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(gh github.RepositoriesService, httpDownloader HTTPDownloader) *Downloader
func (*Downloader) GetReadCloser ¶
func (downloader *Downloader) GetReadCloser(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 ¶
func ConvertRegistryToFile ¶
func ConvertRegistryToFile(rgst *khulnasoft.Registry) (*File, error)
type GitHubContentAPI ¶
type GitHubContentAPI interface {
GetContents(ctx context.Context, repoOwner, repoName, path string, opt *github.RepositoryContentGetOptions) (*github.RepositoryContent, []*github.RepositoryContent, *github.Response, error)
}
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 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.