fetcher

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicMode  = "basic"
	PRScanMode = "fetchPR"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

type Fetcher struct {
	PluginName     string   // Name of the VCS plugin to use
	AuthType       string   // Authentication type (e.g., "http", "ssh")
	SshKey         string   // Path to the SSH key
	Branch         string   // Branch to fetch
	OutputPath     string   // Output path for fetching
	RmListExts     []string // List of extensions to remove after fetching
	ConcurrentJobs int      // Number of concurrent jobs to run
	// contains filtered or unexported fields
}

Fetcher represents the configuration and behavior of a fetcher.

func New

func New(pluginName, authType, sshKey, branch, outputPath string, rmListExts []string, jobs int, logger hclog.Logger) *Fetcher

New creates a new Fetcher instance with the provided configuration.

func (*Fetcher) FetchRepos

func (f *Fetcher) FetchRepos(cfg *config.Config, fetchReqList []shared.VCSFetchRequest) (shared.GenericLaunchesResult, error)

FetchRepos fetches repositories concurrently.

func (*Fetcher) PrepFetchReqList added in v0.2.0

func (f *Fetcher) PrepFetchReqList(cfg *config.Config, repos []shared.RepositoryParams) ([]shared.VCSFetchRequest, error)

PrepFetchReqList prepares fetch arguments for the repositories.

Jump to

Keyboard shortcuts

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