Documentation
¶
Index ¶
- Constants
- Variables
- func ABSPKGBUILD(httpClient HTTPRequestDoer, dbName, pkgName string) ([]byte, error)
- func ABSPKGBUILDRepo(ctx context.Context, cmdBuilder exe.GitCmdBuilder, ...) (bool, error)
- func AURPKGBUILD(httpClient HTTPRequestDoer, pkgName, aurURL string) ([]byte, error)
- func AURPKGBUILDRepo(ctx context.Context, cmdBuilder exe.GitCmdBuilder, ...) (bool, error)
- func AURPKGBUILDRepos(ctx context.Context, cmdBuilder exe.GitCmdBuilder, logger *text.Logger, ...) (map[string]bool, error)
- func PKGBUILDRepos(ctx context.Context, dbExecutor DBSearcher, aurClient aur.QueryClient, ...) (map[string]bool, error)
- func PKGBUILDs(dbExecutor DBSearcher, aurClient aur.QueryClient, httpClient *http.Client, ...) (map[string][]byte, error)
- type DBSearcher
- type ErrAURPackageNotFound
- type ErrGetPKGBUILDRepo
- type HTTPRequestDoer
- type ScannerCloser
Constants ¶
View Source
const (
MaxConcurrentFetch = 20
)
Variables ¶
Functions ¶
func ABSPKGBUILD ¶
func ABSPKGBUILD(httpClient HTTPRequestDoer, dbName, pkgName string) ([]byte, error)
ABSPKGBUILD retrieves the PKGBUILD file to a dest directory.
func ABSPKGBUILDRepo ¶
func ABSPKGBUILDRepo(ctx context.Context, cmdBuilder exe.GitCmdBuilder, dbName, pkgName, dest string, force bool, ) (bool, error)
ABSPKGBUILDRepo retrieves the PKGBUILD repository to a dest directory.
func AURPKGBUILD ¶
func AURPKGBUILD(httpClient HTTPRequestDoer, pkgName, aurURL string) ([]byte, error)
func AURPKGBUILDRepo ¶
func AURPKGBUILDRepo(ctx context.Context, cmdBuilder exe.GitCmdBuilder, aurURL, pkgName, dest string, force bool) (bool, error)
AURPkgbuildRepo retrieves the PKGBUILD repository to a dest directory.
func AURPKGBUILDRepos ¶
func PKGBUILDRepos ¶
func PKGBUILDRepos(ctx context.Context, dbExecutor DBSearcher, aurClient aur.QueryClient, cmdBuilder exe.GitCmdBuilder, logger *text.Logger, targets []string, mode parser.TargetMode, aurURL, dest string, force bool, ) (map[string]bool, error)
Types ¶
type DBSearcher ¶
type ErrAURPackageNotFound ¶
type ErrAURPackageNotFound struct {
// contains filtered or unexported fields
}
ErrAURPackageNotFound means that package was not found in AUR.
func (ErrAURPackageNotFound) Error ¶
func (e ErrAURPackageNotFound) Error() string
type ErrGetPKGBUILDRepo ¶
type ErrGetPKGBUILDRepo struct {
// contains filtered or unexported fields
}
func (ErrGetPKGBUILDRepo) Error ¶
func (e ErrGetPKGBUILDRepo) Error() string
func (*ErrGetPKGBUILDRepo) Unwrap ¶
func (e *ErrGetPKGBUILDRepo) Unwrap() error
type HTTPRequestDoer ¶ added in v12.5.3
HTTPRequestDoer is an interface for HTTP clients that can perform GET requests.
type ScannerCloser ¶ added in v12.5.3
ScannerCloser combines a bufio.Scanner with a Close method.
func GetPackageScanner ¶ added in v12.5.3
func GetPackageScanner(ctx context.Context, client HTTPRequestDoer, aurURL string, logger *text.Logger) (*ScannerCloser, error)
GetPackageScanner fetches the AUR packages.gz file and returns a scanner for reading its contents. The caller must call Close() on the returned ScannerCloser when done to properly release resources.
func (*ScannerCloser) Close ¶ added in v12.5.3
func (s *ScannerCloser) Close() error
Close closes the underlying gzip reader if present.
Click to show internal directories.
Click to hide internal directories.