Documentation
¶
Index ¶
Constants ¶
const ( // PlaceholderPkg is replaced with the package name. PlaceholderPkg = "$pkg" // PlaceholderFilename is replaced with the source file name. PlaceholderFilename = "$filename" // PlaceholderHashType is replaced with the lowercase hash algorithm (e.g., "sha512"). PlaceholderHashType = "$hashtype" // PlaceholderHash is replaced with the hash value. PlaceholderHash = "$hash" )
Lookaside URI template placeholders supported by BuildLookasideURL.
Variables ¶
This section is empty.
Functions ¶
func BuildLookasideURL ¶
BuildLookasideURL constructs a lookaside cache URL by substituting placeholders in the URI template with the provided values. Supported placeholders are PlaceholderPkg, PlaceholderFilename, PlaceholderHashType, and PlaceholderHash. Placeholders not present in the template are simply ignored.
Returns an error if any of the provided values contain a placeholder string, as this would cause ambiguous substitution results depending on replacement order.
Types ¶
type FedoraSourceDownloader ¶
type FedoraSourceDownloader interface {
// ExtractSourcesFromRepo processes a git repository by downloading any required
// lookaside cache files into the repository directory. Files whose names appear
// in skipFilenames are not downloaded (e.g., files already fetched separately).
ExtractSourcesFromRepo(
ctx context.Context, repoDir string, packageName string,
lookasideBaseURI string, skipFilenames []string,
) error
}
type FedoraSourceDownloaderImpl ¶
type FedoraSourceDownloaderImpl struct {
// contains filtered or unexported fields
}
FedoraSourceDownloaderImpl is an implementation of GitRepoExtractor.
func NewFedoraRepoExtractorImpl ¶
func NewFedoraRepoExtractorImpl( dryRunnable opctx.DryRunnable, fileSystem opctx.FS, downloader downloader.Downloader, retryCfg retry.Config, ) (*FedoraSourceDownloaderImpl, error)
NewFedoraRepoExtractorImpl creates a new instance of FedoraRepoExtractorImpl with the provided downloader.
func (*FedoraSourceDownloaderImpl) ExtractSourcesFromRepo ¶
func (g *FedoraSourceDownloaderImpl) ExtractSourcesFromRepo( ctx context.Context, repoDir string, packageName string, lookasideBaseURI string, skipFileNames []string, ) error
ExtractSourcesFromRepo processes the git repository by downloading any required lookaside cache files into the repository directory.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package fedorasource_test is a generated GoMock package.
|
Package fedorasource_test is a generated GoMock package. |